What are you trying to log in to when it prompts you for an authorization code?
Did you read the link, specifically the part where it says:
Get a code from Settings on your trusted device
If you can’t receive a verification code on your trusted devices automatically, you can get one from Settings, even if your device is offline.
From your iPhone, iPad, or iPod touch:
In iOS 10.3 or later:
- Go to Settings > [your name].
- Tap Password & Security > Get Verification Code.
In iOS 10.3 or later, if your device is offline:
- Go to Settings > [your name].
- Tap Password & Security.
- A message says "Account Details Unavailable." Tap Get Verification Code.
In iOS 10.2 or earlier:
- Go to Settings > iCloud.
- Tap your Apple ID username.
- If your device is offline, tap Get Verification Code. If your device is online, tap Password & Security > Get Verification Code.
From your Mac:
- Go to Apple menu > System Preferences, then click Apple ID.
- Click Password & Security > Get Verification Code.