Hey there! Nice to meet you!
I'm sorry you are experiencing this.
Based on your description, your Microsoft account was also compromised. The hacker was able to remove the account's primary email address/security info and replace it with their own email address.
Your purchased licenses (Minecraft game) and your Minecraft account are permanently linked to your compromised Microsoft account.
Since the security info has been replaced by the hacker, I'm afraid there is no other working method to recover the Microsoft account, and Microsoft Support cannot help either.
Thank you for your understanding.
Best regards,
Darhyl