Do you have a gift card that you want to associate with your Apple ID? You can do this by first logging into appleid.apple.com. Once logged in, you can scroll down to the Payment & Shipping section. You can then click “Edit Payment Information…” and add or change your card.
Be careful, if you’re using a Visa/AmEx/Mastercard/etc. gift card, that you don’t throw the card away. When you try to use those funds later, for example on Apple.com, you will be asked for the security code on the card. If you don’t have the card anymore, those funds may be permanently inaccessible outside of some uncertain intervention by the seller or issuer of the card.