Microsoft 365 features that help users manage their subscriptions, account settings, and billing information.
Hello
If this was via Microsoft directly, Please go to https://account.live.com
Sign into your Microsoft account. Then go to Services. Click on Manage for the subscription plan you want to cancel.
If you signed up during the last 30 days, you might be still within the window to ask for a refund. Go to https://support.microsoft.com/contactus, Type "Billing" and press Enter. On the next screen, click "Contact support" at the bottom of the page, then choose "Microsoft 365" > "Manage my subscription". You’ll then see the option to chat with a Microsoft support agent who has access to your account to help review the issue.
You can reference this detail step by step instruction with screenshots I posted in this thread: https://learn.microsoft.com/en-us/answers/c/2714817
If it has been more than 30 days, then it depends where you live, you might be qualified for a prorated refund. Check this out: https://support.microsoft.com/en-us/accounts-billing/subscriptions/countries-with-prorated-refunds-for-microsoft-subscriptions
==========
If this is signed up via third party, you will have to contact their support for their refund policy.