Is your iPhone carrier locked? How to unlock your iPhone for use with a different carrier - Apple Support
How to check:
- Go to Settings > General, and tap About.
- Under Carrier Lock, you should see a message that says "No SIM restrictions." If you don't see that message, contact your carrier.