Hi Marwa_kamaran
Welcome to the Apple (user-to-user) community
Re: have a problem with the apple gift cards
Seems Apple gift cards need to be "redeemed" in order to use them.
To see which type you have:
What type of gift card do I have? - Apple Support
Your Apple ID is the account that you use to access all Apple services and make all of your devices work together seamlessly. ie: The Apple ID gives access to the App Store, iCloud, iMessage, Apple Music, Apple TV+ and more.
See the article below for what payment methods you can use in your country or region: Payment methods that you can use with your Apple ID - Apple Support
If your card works with your Apple ID: See:
What you can buy with your Apple Gift Card or Apple Account balance - Apple Support
NB: says: "Some purchases might require that you have a credit card on file,
even if you use your Apple Account balance to make the purchase".
and
How to redeem your Apple Gift Card or App Store & iTunes gift card - Apple Support
and
How to: Check your gift card balance - Apple Support
Trouble-shooting if needed:
What to do: If you can't redeem your Apple Gift Card or App Store & iTunes Gift Card - Apple Support
All the best :-)