Here’s what you can do to diagnose and fix the problem:
Check the SIM card for physical damage or dirt.
Try a different SIM card.
Try to fix a possible connection problem in the SIM card slot.
Replace the battery if it is not working.
Check the phone’s settings and confirm the SIM card is listed there.
Restart the device.