Hi abudicha,
Thank you for contributing to the Apple Support Communities.
It sounds like you are setting up Family Sharing and creating an Apple ID for your child.
In this case, it is necessary to use a credit card when creating the Apple ID, although the payment method can be changed to debit card once the Apple ID is created.
To comply with child online privacy protection laws, you will use the CVV or security code from a valid credit card as part of providing your parental consent. If the card on file is a debit card or another payment method, you’ll be asked to provide a credit card before you can continue. After you create the child's Apple ID, you can change your payment method back to a debit card.
You can find this information at this link:
Family Sharing and Apple IDs for kids - Apple Support
All the best,
Jeremy