If you're upgrading to a new iPhone from an old one, or from an Android device, then you need to take steps to make sure that Google Authenticator continues to work as you'd expect.
Google Authenticator is an app and a service that provides the security benefits of two-step authentication without the risks involved in text messages. If you rely on it, then you tend to use it every day and possibly even multiple times a day, in which case you need it to work with your new device.
Setting up the new phone
You're going to be using both the app and the online Google Authenticator service for this. Install the Google Authenticator app onto your new device.
Now go to myaccount.google.com and sign in to your Google Account. Click on Security and then 2-Step Verification.
In the page that appears, you'll see a section headed Authenticator app. Click on Change Phone.
This takes you through setting up your new device, and will first prompt you to say whether you're using iPhone or Android. Then it will display a QR code.
Open the Google Authenticator app on your iPhone and click on Scan Barcode. You'll have to confirm that you give permission for the app to use your camera, but when you have, point the phone at the QR code.
A new six-digit number will be generated in the app and you enter that onto the website.
More or less done
That could be all you need to do. This has set up your new iPhone to use Google Authenticator. Or rather, it has set up one Google Account to use it.
You may well have more than one, in which case you need to go through this again. The sole difference being at the stage where you go to myaccount.google.com. There you enter whatever your other or next Google Account is.
If you also have other services set up to use the Google Authenticator for code generation, you may also have to turn off the authentication for each individual service before the transfer takes place. After the Google Authenticator app has been shifted over to the new iPhone, re-add the services.
Just one more thing, in case you were planning to delete your Google Authenticator app off your old device. You can, but don't do it until you are sure you've set up every Google Account with it on the new phone.