Add a 6-digit code from an authenticator app to your sign-in.
Settings → Security & Login → Two-factor authentication → Turn on.
Confirm your password, then scan the QR code with an authenticator app (Google Authenticator, Authy, 1Password and others all work) or type the setup key. Enter one code from the app to finish — nothing changes until that code is accepted.
Keep the ten backup codes you are shown. Each one signs you in once if you lose your phone. You can generate a new set at any time, which cancels the old ones.