Sometimes the hardware is perfectly fine, but the phone’s software has crashed or hung up. The phone’s modem (the component that talks to the cell tower) might need a "reboot" to recognize the card again.
A systematic approach to determine the root cause: invalid sim means