First of all, GitHub isn't requiring that users use 2FA, as far as I'm aware. They're requiring that users switch from authenticating to Git using just a plain password to using either an SSH key or a personal access or OAuth token for HTTPS. These are the same requirements as for users that currently have 2FA set up, since plain passwords are not allowed over HTTPS for those users.
However, I do strongly recommend 2FA (as, of course, does GitHub). You can't use a hardware token that generates a six-digit code as far as I'm aware. You can use any WebAuthn device that supports FIDO2, like a YubiKey (which you said you have), Windows Hello, or TouchID, or you can use a TOTP app from your phone.
If you want to set up 2FA, then you can go to https://github.com/settings/security and set up the devices there. There's also a helpful link that points you to the documentation. I've personally set up two YubiKeys and a TOTP app, since the latter is a little easier to deal with in recovery situations.
Note that once you do that, you'll need to use a personal access token instead of your password when using Git over HTTPS. You can follow the directions outlined in the Git FAQ to reset your credential manager and then, when prompted for the password by Git, enter your token. Your username can remain the same.