just a note, I just experienced similar thing - today day after an overnight automatic reboot, I discovered could not receive or make calls. All went direct to voicemail (which I couldn't access), got error saying no access to the network (data was fine) and that I should enable 2G. 2G, 4G, 5G - nothing worked, including calling via WiFi.
Went to my provider, got a new SIM, reboot -> seems fine.
I am pretty sure this is the second or third time I have had to do this (including stock and Calyx, I think). Phone and OS have changed, but carrier has always been Telstra (Australia).
Will also note that - purely subjectively - it seems that the phone is reporting better 5G signal (2-4 bars), as opposed to the single bar I was getting over the last few weeks. Noticed that immediately in the shop, too.
Battery life has been noticeably declining - so much that I ordered a new one (not yet installed) - in a similar period. Is the phone 'trying harder' to maintain a signal? Will be interesting to see if there's change.
Pixel 8a.
Why would a SIM change have such an effect?