Two-factor authentication (2FA) requires a password, along with a unique form of identification like a login code via text message (SMS) or a mobile application, to verify a user. When the user enters the password, they are prompted to enter the security code to log in to the website. If the code mismatches, the user will be blocked from entering the website.
Examples of 2FA: Google Authenticator, YubiKey, Microsoft Authenticator, etc.