I'm sure gail from maine's answer is absolutely correct. However there is a difference between an "Apple Store" gift card and an "App Store & iTunes" gift card:
What type of gift card do I have? - Apple Support
As stated in the "App Store & iTunes Gift Cards" section of the above article, the "App Store & iTunes" gift card can be used for iCloud. My understanding is that if you upgrade your iCloud Storage plan, then the monthly payment will be deducted from your "App Store & iTunes" gift card first until the balance runs out. In effect, this is one way to "prepay" for iCloud Storage for an entire year even though the annual plans were discontinued.