Additional team and channel-related features and issues within Microsoft Teams for Education
From your description, it appears that Teams may be asking for a code other than your Microsoft account password.
Please open the original invitation and select the Join link. Alternatively, enter the Meeting ID and the corresponding passcode shown in the invitation. If Teams says that a verification code was sent to your email, please check your inbox and junk or spam folder.
For more details, please refer to this: Join a meeting in Microsoft Teams
If you cannot find the invitation or the required code, please contact the meeting organizer and ask them to resend the complete meeting link and passcode.
If I have misunderstood the issue, please reply with the exact message displayed on the screen. You can also share a screenshot, if possible, but please hide any personal information, email addresses, meeting links, meeting IDs, or codes before posting it.
I hope this helps.