When you are using two factor authentication combined with apps like Google Authenticator, make sure that when you buy a new phone, you ensure that your new phone can generate the necessary authentication codes.

Do this by first logging in using your old device and scanning the QR code in your account (Settings –> Two factor authentication) with your new phone.

If you can no longer access your old device and, as such, have shut yourself out of your account, contact the administrator of your platform. They will be able to reset your two factor authentication settings, after which you can connect your new phone to your account.