1. Settings, then Face ID and Passcode (or Touch ID and Passcode), and enter your current passcode.
2. Tap Change Passcode.
3. Tap Passcode Options to choose a 6-digit code, a 4-digit code, or a custom code with letters and numbers (the strongest).
4. Avoid easy codes like 123456, 000000 or your birth year.
5. Forgot it? Too many wrong tries lock the iPhone, and the only fix is erasing it (see our "iPhone Unavailable" tip). Keep a backup.