TOTP never requires a phone number. On GitHub, they either show you a qr code you can scan in an app, or a text you can import. All apps support this sign up process, from google authenticator to console-based tools like totp[0].
Other 2FA implementations may require phone numbers. But HOTP and TOTP don't.
[0]: https://github.com/arcanericky/totp