What exactly isn’t working?
Are you receiving the codes to your email address or do you use an authenticator app To receive the code?
Have you tried logging into your Google account (using an alternative verification method) & turning off 2-step authentication, logging out then logging in again & turning it back on?