Microsoft 365 features that help users manage their subscriptions, account settings, and billing information.
When a Microsoft 365 subscription is purchased or activated, that becomes permanently associated to the Microsoft account used as a digital licence and there is no native process provided to move the subscription to another Microsoft account.
The best option would be to use the steps provided on this link to cancel the subscription, then purchase a new subscription on the correct Microsoft account.
The steps to cancel a Microsoft 365 subscription are provided on this link, and while managing the subscription, ensure you cancel the recurring billing on that subscription.
Then you should receive a pro-rata refund, you can check your eligibility for a refund on this link.