Reminder: you should be using 2-factor authentication on your GitHub account. Go and do that
now if that's not the case.
Still here? Great! If you have no access to your phone then your
printed recovery codes, stored in a safe location, may be
the only way to gain access to your account from a new device. These are your ultimate fallback, so if you don't know where they are, go to
https://github.com/settings/auth/recovery-codes, print out a new set, and keep it safe!