Microsoft 365 features that help users manage their subscriptions, account settings, and billing information.
Hello
Unfortunately transfer is not possible. You would have to cancel this subscription first. Please go to https://account.live.com
Sign into your Microsoft account. Then go to Subscriptions. Click on Manage for the subscription plan you want to cancel.
Then sign up with the right account.
===============
If this is code redeemed via purchase from third party, you would have to cancel it via the seller you purchased from. Microsoft explains it here: https://support.microsoft.com/en-us/account-billing/manage-your-microsoft-365-subscription-purchased-through-a-third-party-44749f45-4c0b-5d41-a73f-7634b8d2a763