You can't actually buy anything "with" a gift card. You redeem the card to your account balance and that is used to pay for the item Read this support article for information about how to check the status of a refund for apps or content that you bought from Apple, and how long it takes to receive a refund if you are granted one --> Check the status of a refund for apps or content that you bought from Apple - Apple Support
After you request a refund you'll receive a status update by email within 48 hours. If your refund is approved, the funds are applied to the same payment method that you used to buy the item. How long it takes for a refund to appear on your account or statement depends upon the payment method used:
● Store credit—It might take up to 48 hours to see the refund in your Apple Account balance.
● Mobile phone billing—It might take up to 60 days for the statement to show the refund. Processing time might be affected by your carrier. You can contact your carrier for an update.
● Credit and debit cards, Apple Pay, Apple Cash, and all other payment methods—It might take up to 30 days for the statement to show the refund. If you don't see the refund after 30 days, contact your financial institution."
Since the article specifically says "statement", which for me is the thing that arrives monthly in my mailbox, I wonder if you check your daily card transactions if you might see it earlier?
For apps and media you can also sign into https://reportaproblem.apple.com to check if the status of your item is "Refunded".
If you need to contact Apple about this, click on this link --> Choose your country or region - Official Apple Support and choose a path that gets assistance from Apple staff.