"No SIM" can be the card, the tray or the SIM reader in the phone.
1. Try the SIM in another phone. If it fails there too, replace the SIM at your network provider's service centre.
2. Try another SIM in the phone.
3. Check the tray is the right one for this model and isn't bent. A wrong tray presses the card in the wrong place.
4. Clean the SIM gold contacts with a dry cloth.
5. Look into the SIM slot with a light for bent pins.
6. Restart the phone and toggle airplane mode.
If both slots fail with good SIM cards, the SIM reader or its circuit on the board is faulty. Bent reader pins can sometimes be lifted carefully with a fine pick.
If a phone shows "SIM locked to network", that is a carrier lock, not a hardware fault: contact the network that sold the phone.