I've experienced similar issues with my iPhone 12 using iOS 17.5.1, where it wouldn't connect to the network and showed 'No SIM' in the settings, even though my other eSIM number worked fine. I tried various fixes, including removing and cleaning the SIM and slot, using a different SIM, performing a hard reset, and resetting all network settings. Each time, the SIM would work temporarily before dropping out again.
I even switched carriers, hoping to resolve the issue, but the problem persisted. Eventually, I switched to an eSIM with my carrier, which "fixed" the issue but wasn't ideal since I couldn't use my other eSIM simultaneously. Additionally, I faced another problem where I couldn't activate iMessage with my new carrier after porting my number.
What finally seems to have worked is turning off and deleting my NordVPN app. This allowed me to activate iMessage with my new carrier, and the other SIM card started working. After reinstalling and reactivating NordVPN, the SIM and network are still functioning for the past day.
I believe there's a software glitch in the latest 17.5.1 update, as I hadn't encountered any issues with my SIM card before. Hope this feedback helps!"