Hello
If the Gmail address is already taken, it means it is currently associated with another Microsoft account.
Launch your web browser in incognito mode, go to https://account.live.com, sign in with the gmail address. If you don't know the password, you can try the forgot password to recover it.
If you manage to get in, go to Your info > sign in preference, add alias > create new. Give it an outlook alias, then delete the gmail from there, so that it is free to add it to the Microsoft account you want instead.
Once you have the gmaiol added to the actual Microsoft account you want to add, important, also go to Security > Manage how I sign in, you need to update here too, so you can receive the two-factor code.