Two factor authenticator from mobile to mac

Download Authenticator 2FA App from App Store..

In the mobile app, suppose you have the authenticator app like TOTP Authenticator. Click the entry ... and Edit button or something like that, and then a eye button. You'll get a QR code.

In the app, click + and scan the QR code. Now you get the authentication code on mac.