It needs to be setup first.
https://support.microsoft.com/en-us/office/set-up-your-microsoft-365-sign-in-for-multi-factor-authentication-ace1d096-61e5-449b-a875-58eb3d74de14
--please don't forget to upvote
and Accept as answer
if the reply is helpful--