If you’ve lost your phone, or just bought a new one, you can still log in using one of the back up codes you were given when you first set up two-factor authentication. Enter your login details as usual, and then click ‘use a back up code’. Then, remove two-factor authentication from your account.
To register your new device, simply set two-factor authentication up again using the same process as before. Scan the QR code with your new phone, and it will replace your old one as the registered device.
If your old phone has been lost or stolen, don’t worry. Any codes generated on that device will not allow access to your account once you’ve set up a new device.