In many cases, this problem is caused by your SIM card becoming slightly dislodged.
You can try:
1. Re-Seating the SIM Card
2. Update or restore your iOS firmware to the latest version
3. Enable then disable Airplane Mode
4. Check for Carrier Settings Update
Go to Settings app – General- About
If an update is available, a window will pop up. Tap it and follow the onscreen instructions.
5. Check if your account is available
It’s also possible that your phone company account isn’t valid. In order for your phone to be able to connect to a phone company network, you need a valid, active account with the phone company.
6. Test for a Malfunctioning SIM Card
If your iPhone still says it has no SIM, your SIM card could have a hardware malfunction. One way to test this is by using a SIM card from another cell phone and seeing what happens. Make sure to use the correct size—standard, microSIM, or nanoSIM—for your phone. If the No SIM Card Installed warning disappears, then your iPhone SIM is broken.