See this https://support.apple.com/en-us/HT204060#adjust
Change your passcode or passcode settings
On iPhone X and later, or iPad with Face ID, go to Settings > Face ID & Passcode. On earlier iPhone models, go to Settings > Touch ID & Passcode. On devices without Touch ID, go to Settings > Passcode.
You'll find several settings and options:
- Turn Passcode Off: Tap this option to turn off your passcode.
- Change Passcode: Enter a new six-digit passcode. Or tap Passcode Options to switch to a four-digit numeric code, a custom numeric code, or a custom alphanumeric code.
- Require Passcode: As soon as you lock your screen, the default for this setting will ask you to enter your passcode to unlock. If you don't want an immediate passcode requirement, change this setting. (For your own security, if you use Touch ID or Apple Pay, you can't change the immediate passcode requirement).
- Allow Access When Locked: Use this option to allow access to some features when your device is locked, including Today View, Notification Center, Siri, Reply with Message, Control Center, Wallet, and USB accessories.
- Erase Data: Choose whether to erase your device automatically after ten failed passcode attempts. If you don’t enable this option, your device will need to be restored on a computer after ten failed attempts.