Bypass Two-Factor Authentication on iPhone

Solution 1:

Apple Support page on 2FA:

What if I can't access a trusted device or didn't receive a verification code?

If you're signing in and don’t have a trusted device handy that can display verification codes, you can have a code sent to your trusted phone number via text message or an automated phone call instead.

Click "Didn't Get a Code" on the sign in screen and choose to send a code to your trusted phone number. You can also get a code directly from Settings on a trusted device.

There's more info on the "Learn how to get a verification code" page, too.