An iTunes gift card is a prepaid digital code that can be used to purchase music, movies, TV shows, apps, and other digital content from the iTunes Store, App Store, and Apple Books. To buy music with an iTunes gift card, you must first redeem the gift card code to add the funds to your Apple ID balance.
To redeem an iTunes gift card, open the App Store app on your iPhone, iPad, or iPod touch. Tap the Redeem button at the bottom of the screen, then tap Use Camera and scan the gift card code. You can also enter the gift card code manually by tapping Enter Code. Once you have redeemed the gift card code, the funds will be added to your Apple ID balance.