I think we’re still getting cross-threaded on “account” terminology
Mac local “user accounts” (the one you choose during the initial login and for which you enter a password) are NOT the same as AppleIDs.
Regardless of the local user account being used on the Mac, if your Mac is signed-in to the same AppleID (as displayed in Apple -> System Preferences -> AppleID) the verification code it generates (or receives) WILL allow you to initially connect your new iPad using the same AppleID.
If the AppleIDs are different … or if the Mac is not connected to the internet … the Mac can NOT receive the code.
However, even a “internet-disconnected” Mac (using the same AppleID) CAN generate a verification code for your new iPad from: Apple -> System Preferences -> AppleID -> Password & Security -> Get Verification Code.
It’s ALL about using the SAME AppleID, regardless of device or local user account naming.
Hope this helps.