If you want to make purchases or update / download apps, including free apps, you need to have a payment method on file.
If you don't have a credit card or don't want to use a credit card, you can also use your Apple ID balance as payment method, see -> Add money to your Apple ID balance
Add money to your Apple ID balance – Apple Support (UK)
See also:
What you can buy with your Apple Gift Card or Apple ID balance
What you can buy with your Apple Gift Card or Apple Account balance – Apple Support (UK)
How to redeem your Apple Gift Card or App Store & iTunes gift card
How to redeem your Apple Gift Card or App Store & iTunes gift card – Apple Support (UK)
When redeeming a gift card, (1) the amount will be credited to your Apple ID balance and (2) then you need to set your Apple ID balance as your default payment.
(1) See -> Check your Apple ID balance
Check your Apple ID balance – Apple Support (UK)
(2) See -> Add a payment method to your Apple ID
Add a payment method to your Apple ID – Apple Support (UK)
If you update your payment method or add funds to your Apple ID balance, It would take about 1 to 3 business days in order to process.
If you're still unable to update your payment method, Contact Apple Support.
Also read the articles below ⤵️
If you can't redeem your Apple Gift Card or App Store & iTunes Gift Card
If you can't redeem your Apple Gift Card or App Store & iTunes Gift Card - Apple Support
- You can't redeem Apple Gift Cards or App Store & iTunes Gift Cards outside the country or region of purchase. For example, if you bought an App Store & iTunes Gift Card in France, you can't redeem it in the App Store in the United States.
About Gift Card Scams -> About Gift Card Scams - Official Apple Support