but it asks to input a card information and when I do, it does not work.
See -> Payment methods you can use with your Apple ID
Payment methods you can use with your Apple ID – Apple Support (UK)
fyi: Not all credit & debit cards seem to work with App Store / iTunes Store, try a different one, or preferably a credit card. If your card is not accepted as a paymenf method, you need to contact your bank.
See also -> If your payment method is declined in the App Store or iTunes Store, see ->
If your payment method is declined in the App Store or iTunes Store - Apple Support
⤵️
How to complete your purchase if a payment failed or was declined
- On your iPhone or iPad, open the Settings app.
- Tap your name.
- Tap Payment & Shipping.
- Add a different payment method and remove the old one.
- Try to complete your purchase.
If you still can't make a purchase
Click here for more support and assistance.