For a work or school account you can add an authentication device here
https://mysignins.microsoft.com/security-info
then using the generated QR code you can link up the authentication device.
--please don't forget to upvote
and Accept as answer
if the reply is helpful--