The screen lock stops someone who picks up your phone from opening it. It also protects the encryption of your data: on an iPhone, setting a passcode is what turns that encryption on. A short or obvious code is easy to guess or to watch you type. Use at least six digits; a longer code, or a password with letters, is stronger. Avoid codes like 0000 or 1234.
Fingerprint or face unlock is fine for most people, as long as a strong code sits behind it. The phone still asks for the code after a restart. If someone could force you to unlock the phone with your face or finger, for example at a protest or a border, turn face and fingerprint unlock off beforehand, or switch the phone off.
iPhone
- Go to Settings → Face ID & Passcode. On an iPhone with Touch ID, it is Touch ID & Passcode.
- Tap Turn Passcode On, or Change Passcode if you already have one.
- Tap Passcode Options and choose Custom Numeric Code or Custom Alphanumeric Code. Apple calls these the most secure options.
- In Settings → Display & Brightness → Auto-Lock, choose a short time.
Android
- On a Pixel, open Settings → Security & privacy → Device unlock → Screen lock. On a Samsung, open Settings → Lock screen → Screen lock type. On other phones, search Settings for Screen lock.
- Choose PIN with six or more digits, or Password.
- Don't use Swipe or None: they give no protection.