So... It happened to me as well. My second time. This time on my iPhone XS. Before that this issue occurred on my 13" iPadPro. I was not able to recover from this issue and then sold it as defective...
I recently updated my iPhone XS from 13.7 to 14.2. I was actually skipping 14.0 and 14.1 to pickup more bug fixes and stay away from testing. I looks like waiting for the dot-2 release was not enough...
In short, today I'm convinced that despite the rare cases when people have real problems with the SIM card, this issue is caused by a crash in the modem software stack or some interfaces to it. Just the UI tells the user something is wrong with the SIM... And this is why I think so in a non-TL;DR version.
With 13.7 and after the update to 14.2, my iPhone worked well, whereas I stayed mostly at my place or in vicinity (Corona, you know...). My iPhone currently has a physical SIM and an eSIM. Since I was outside the EU for two 10 days, the data roaming was turned off on both SIMs. A few days ago, on the last Sun, I went to the alps to make some astrophotography pictures. This is a remote place with bad coverage and on the edge of two international networks: Germany and Austria. On this evening, I stayed on the same spot for around 5h and walking away max 10m. Just after arriving and while having very low signal, I turned the data roaming on my German physical SIM card so that I will get Internet if the phone registers in Austria. It certainly worked and was OK for 10 min or so. Then, out of sudden, the iPhone brought a message that my data plan is not valid anymore and asked if I would like to update my contacts to a new phone line. I looked up and saw that the physical SIM was listed as not present. I restarted the iPhone and it worked for another 5 min before losing the SIM card. No, I was not doing boxing or jumping - the iPhone way laying peacefully in my jacket. I turned off the eSIM in Setting to exclude it. On this evening, I was busy with other things than debugging iOS problems, so I kept restarting iPhone occasionally in the hope it will stabilize by the magic of restarts. No it did not. Moreover, after 4-5 restarts, it did not get see the SIM anymore at all. I gave up. I went home later in the night, and since then I do not have problems with the SIM card anymore! I went to a city yesterday, and had no problems either! It works now, 4 days after the same way well as after upgrade and before.
All this makes me think:
1) it is not a SIM problem in most cases, unless the SIM is really damaged or the cellular plan is not valid
2) it is not an iPhone hardware problem, like contacts in the SIM slot
3) in many such cases, the problem is probably caused by a crash of the modem stack in difficult cellular environment. I agree, such a problem is hard to track and debug
4) I hope Apple will pay a more serious attention to this as the issue repeats in the same form since a longer time for may people
5) Selling my iPad was a mistake. Updating to another iOS (which also comes with another version of the modem stack) would solve the problem
6) I hope there is another channel to reach out to Apple than going to the "Genius Lab" in the Apple Store or talking to the first support line. Nice and kind people, not able to help at all.
I will go to that place in the alps once more for sure and will report how it was ;-)
PS. And Safari (Version 14.0 (15610.1.28.1.9, 15610)) crashed on this page when I was writing the first version of this report ;-) Apple! What is going on with the software quality?