Devices running iOS 13.4 and later automatically use two-factor authentication.
Here’s how to set it up if the feature isn’t active:
Launch theSettingsapp.
Tap yourApple Account(name) at the top of the screen.

In some versions of iOS, this option is called “Apple ID.”
You may also see this option asPassword & Security.
TapTurn on Two-Factor Authentication>Continue.

You may be prompted to answer Apple Account security questions.
As part of the setup process, you’ll receive a verification code by text message or phone call.
Enter a phone number to receive the code.

Two-factor authentication is now turned on for your Apple Account and iPhone.
Your Apple Account isn’t the only account it’s possible for you to secure using two-factor authentication.
Use the feature to enhance the security of many accounts, includingFacebook, Gmail,Fortnite, andYahoo Mail.

Here’s how to do that on your iPhone.
Select yourApple Account(it’s called “Apple ID” in some versions of iOS).
TapEditfromTrusted Phone Number(s).
ChooseAdd a Trusted Phone Number.
You may be prompted to add your passcode or use Face ID to unlock this area.
Enter the trusted equipment’s phone number and select whether you want to verify via text or phone call.
Enter the verification code sent to the trusted machine.
The number will be added to your Trusted Phone Number list.
If you don’t, the next owner of the equipment might be able to access your account.
Scroll to the bottom of the screen to view the list of trusted devices.
To remove one, select it and tapRemove from Account.
How to Turn off Two-Factor Authentication on iPhone
Interested in turning off 2FA?
you’ve got the option to’t.
That may sound strange, but it’s actually another security measure.
What Is Two-Factor Authentication, and Why Should You Use It?
The first piece of information, or factor, is a username and password combination.
The second factor is usually a randomly generated numerical code.
That’s how Apple’s 2FA system works.
Because each code can only be used once, the system is harder to break.
Two-factor authentication is built into iOS, macOS, iPadOS, tvOS, and Apple websites.