Using both is actually your best bet, but when to use one over the other can be confusing. If you don’t know much about 2FA ...
Protect your X account by re-enrolling hardware security keys before the old Twitter site shuts down on Nov 10 to avoid lockouts.