Go to Account > Security > Manage two-factor authentication and scan the QR code with an authenticator app such as Google Authenticator, Microsoft Authenticator or 1Password. Enter the 6-digit code to switch it on.
Save your recovery codes somewhere safe: they let you in if you lose your phone.