From this support article --> How apps, content, and subscriptions from Apple are billed - Apple Support
"Which payment method is charged?
When you buy items or pay for subscriptions, Apple automatically attempts to charge your payment methods in this order:
1. Apple attempts to use your Apple ID balance to cover the full amount.
2. If you don't have Apple ID balance, you don't have enough to cover the full amount, or an item cannot be paid for with Apple ID balance, Apple attempts to charge your primary payment method (typically a credit or debit card, but varies according to country). The primary payment method is at the top of the list in Settings on your iPhone. You can control which payment method is at the top of the list. [See: Add a payment method to your Apple ID - Apple Support ]
3. If there's a problem with the primary payment method, or if the primary payment method can't be charged for the full remaining amount, Apple attempts to charge your other payment methods in order from top to bottom. If none of them can be charged, Apple may try again." See also sections B and H of Legal - Apple Media Services - Apple
Some purchases aren’t charged to your Apple Account balance
● You can't use your Apple Account balance to send gifts or gift cards.
● For some recurring charges, like AppleCare+, you can't start your subscription with Apple Account balance. But as long as you keep another valid payment method on file and your Apple Account balance would cover an entire charge, your recurring charge will pull from your Apple Account balance (see the article for more information).
● Some subscriptions might not be charged to your Apple Account balance.
● If you use Family Sharing, your family members can't spend your Apple Account balance. Funds that you add to your Apple Account balance are available only to you.