Remove the SIM card and make sure that it's a valid SIM that your carrier provided. Also make sure that it's not damaged, worn, or modified. Then reinsert it.
A SIM tray that comes with one iPhone model won't necessarily work with a different iPhone model. When you insert the correct SIM tray, the SIM tray should be flush with the device.
If you have another SIM card, insert it. You can use a SIM card from any phone with the same format as youriPhone SIM card. If your iPhone works with that SIM card, contact the carrier that issued your original SIM card.