Microsoft 365 features that help users manage their subscriptions, account settings, and billing information.
What do you mean by "linked" to your Gmail account? Do you mean you used your Gmail address as the username for your Microsoft account or do you mean you used a Gmail address as a verification address for a Microsoft account?
If you can still log in, use the "Sign out everywhere" option on https://account.live.com/proofs/manage to make sure the hacker is logged out. It will Log you out as well. Log in again and change the password. Then add your correct verification information and add two-factor authentication or a passkey.