It won't hurt to go through this checklist to make sure notifications sent to your iPhone are also appearing on your Mac when they are sent as a text message (you don't need to be using 2FA to get those verification codes that apparently are going to your iPhone but not to your Mac -- since they come through as if they are text messages, this checklist might help):
iMessage checklist
iPhone and Mac both logged in to same Apple ID. Try logging off and logging on if necessary.
iPhone Settings => Messages shows iMessage as "on" (sometimes toggling this off and then on fixes some things)
iPhone Settings => Messages shows Send & Receive showing both phone number and email (Apple ID)
iPhone Settings => Messages shows Text Message Forwarding and your Mac is listed and shown as "on" there.
iPhone Settings => Messages shows Send as SMS "on" and MMS Messaging and Group Messaging both "on"
On the Mac: Messages => Preferences shows same and correct Apple ID and "You can be reached for messages at" indicates both phone number and Apple ID (email), and "start new conversations from" indicates the phone number.
* Don't see the Text Message Forwarding setting on your iPhone? Go to Settings > Messages, turn off iMessage, turn it back on, tap Send & Receive, tap Use Your Apple ID for iMessage, then sign in with the same Apple ID used on your other devices.
https://support.apple.com/en-us/HT208386
Another thing to try if everything above is correct but the Mac is not getting the verification codes/messages: open Messages on the Mac, in Messages go to Preferences => iMessages and select Sign Out, then close Messages, open it again, and sign in again using the same Apple ID that is being used on the iPhone.