You may need to have a valid payment method on file, even if the app you want to download is free.
See -> Remove a payment method from your Apple ID
Remove a payment method from your Apple ID - Apple Support
⤵️
If you can't remove a payment method
If you have subscriptions like iCloud+, have an unpaid balance, or you use purchase sharing, you must keep at least one payment method on file.
fyi: The iCloud + subscription will be terminated depending on the start date.
If you start on August 1 and are going to cancel now, the subscription will stop on November 1, a monthly term is used.
Click here for more support and assistance.