After you create your account, you can choose whether or not you'd like to enable your 2FA, in your settings. The 2FA is not activated automatically, and to enable, you should go to the settings section to activate it. In case you do, please make sure you follow the instructions and save the barcode that shows below the QR code¹.
Whenever you try to log in, the website is going to ask you to inform a code generated by the app, which you must check every time you login, as the code changes frequently.
One of the reasons the login isn't working is because you might've using the wrong/ out of date code, as every time you log in, you must check your app for the new code generated by the app.
In case you already tried the code, and it didn't work, please allow few seconds for your app to change to a new code and try logging in again. Besides, try not to use autofill apps, as if it fills a wrong data, your code will not work. Alternatively, if you do, make sure the information is correct before proceeding.
If this is not the case, please check the Google 2FA support link or the support for any other app you have been using to try retrieve the code for activation on a new device.
¹ QR code is readable by google authentication app you can download, or other authentication apps available.