Here’s “The Rest of the Story” (As you too are mature enough to remember Paul Harvey)
Once a device has been signed-in to your AppleID using 2FA it’s a Trusted Device.
Any Trusted Device can easily and simply provide you with the 6-digit 2FA code you might need in the future. (even without internet connectivity)
The problem often occurs with users who only have ONE device (usually an iPhone).
When they loose access this single “Trusted Device” they panic and “THINK” that have no way to receive their 2FA code.
Not true !!!
If you have no physical access to any of your Trusted Devices, you can STILL have Apple send the codes - by SMS or VOICE - to virtually ANY phone number worldwide.
Although these “Trusted Numbers” MUST be pre-designated. (i.e. forethought is required)
With the code received in this manner, you can regain access to your account and/or setup a replacement phone.
Individuals who don’t setup Trusted Numbers are in much the same category as those who don’t backup their phones. (After all, who could ever conceive that a small portable electronic gadget might become lost, broken, or stolen)
With all that as a primer, these two IMPORTANT articles may make more sense:
Two-factor authentication for Apple ID - Apple Support
Get a verification code and sign in with two-factor authentication - Apple Support