To see the payment methods that you can use with your Apple ID [account], click here --> Payment methods that you can use with your Apple ID - Apple Support
Note that these are ones that are accepted, but specific kinds (e.g., credit or debit cards) might be required in particular circumstances.
In general I do not think gift cards can be used since they are of fixed value and not credit or debit cards. You could use it in a store to buy an Apple gift card and then redeem that to your account. The article "What type of gift card do I have?" explains the different kinds of gift cards Apple uses, has links on how to redeem them, and what can be purchased with each kind. Click on the link --> What type of gift card do I have? - Apple Support