Form 8332 has nothing to do with claiming your grandchildren. That is a signed agreement that is used only between divorced or never married parents who share custody. You are not divorced from the children's father, nor are you a "couple" who share custody.
If the children and their mother live with you former than half the year (over 183 nights) and you are providing over half their support, you can claim them as dependents on your own tax return. If your daughter is claimed as a dependent she cannot claim dependents of her own.
IRS interview to help determine who can be claimed:
https://www.irs.gov/help/ita/who-can-i-claim-as-a-dependent
WHO CAN I CLAIM AS A DEPENDENT?
You can claim a child, relative, friend, or fiancé (etc.) as a dependent on your 2025 taxes as long as they meet the following requirements:
Qualifying child
- They're related to you.
- They aren't claimed as a dependent by someone else.
- They're a U.S. citizen, resident alien, national, or a Canadian or Mexican resident.
- They aren’t filing a joint return with their spouse.
- They're under the age of 19 (or 24 for full-time students).
- No age limit for permanently and totally disabled children.
- They lived with you for more than half the year (exceptions apply).
- They didn't provide more than half of their own support for the year.
Qualifying relative