See this Apple article: Use a SIM PIN for your iPhone or iPad
Use a SIM PIN for your iPhone or iPad - Apple Support
⤵️
If you forgot or don't know your SIM PIN
Never try to guess a SIM PIN or PUK code.* The wrong guess can permanently lock your SIM card, and then you would need a new SIM card. If your device asks for a PIN or code that you don't know, here's what to do:
- Contact the carrier that gave you the SIM card. If you aren't sure which carrier to call, remove your iPhone SIM card or iPad SIM card and check the card for the carrier's name or logo.
- Ask your carrier to help you unlock your SIM card using the default SIM PIN or PUK code.
- If you can't unlock your SIM card using the SIM PIN or PUK code or if an alert says, "PUK exhausted," ask for a new SIM card.