You may have canceled too late. In that case you will have to pay what is owed and then try for a refund.
Click on this link to review the information in the support article about canceling subscriptions ➔ Cancel a subscription from Apple - Apple Support
Notes:
• “If you signed up for a free or discounted trial subscription and you don't want to renew it, cancel it at least 24 hours before the trial ends." Note that by using an app like this you are automatically agreeing (always read the fine print) to this happening, are responsible for reading if this will happen, and canceling the subscription before the trial ends. E.g., Bait and switch on Apple apps - Apple Community Exceptions apply in some countries ➔ About canceling subscriptions in Germany, Israel, South Africa, or Türkiye - Apple Support
• Deleting an app does not cancel a subscription.
• Canceling a subscription does not automatically start a refund.
• This thread (particularly posts by Mac Jim ID) outlines complex scenarios regarding subscriptions and trials. ➔ Refund request for unintended Snapchat Pl… - Apple Community
If you wish to pursue a refund, follow the directions in this support article about how to request a refund for apps or content that you bought from Apple ➔ Request a refund for apps or content that you bought from Apple - Apple Support The likelihood of you getting a refund may vary greatly from region to region as provided in section B of Legal - Apple Media Services - Apple . Typically refunds are entirely discretionary and not guaranteed. Special terms may apply for some countries: About canceling subscriptions in Germany, Israel, South Africa, or Türkiye - Apple Support
Read this support article for information about how long it takes to receive a refund (if one is granted), and how to check the status of a refund for apps or content that you bought from Apple --> Check the status of a refund for apps or content that you bought from Apple - Apple Support
● 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."