Assuming that you are attempting to setup a new iPhone (?) on an existing AppleID, you can receive (or generate) a verification code on the Mac in the photo. (Assuming that it’s on the same AppleID)
If your new iPhone is already on the AppleID, and you are trying to connect the Mac … you can generate a code ON the iPhone itself.
Detailed instructions for what was just briefly described are at:
Get a verification code and sign in with two-factor authentication - Apple Support
If we’re misunderstanding what you’re trying to do, please post back.