That's what recovery codes are for. Unfortunately it seems a lot of 2FA is now implemented without recovery codes.