Hey there! Nice to meet you!
Based on your description, the hacker was able to remove the account's primary email address/security info and replace it with their own email address.
Since the security info has been replaced by the hacker, I'm afraid there is no other working method to recover the Microsoft account along with its purchased licenses such as the game Minecraft, and Microsoft Support cannot help either.
However, I would recommend reaching out to Minecraft Support regarding your Minecraft account if they can provide an alternative option:
https://help.minecraft.net/hc/en-us/request/new?ticket_form_id=360001225811
Thank you for your understanding.
Best regards,
Darhyl