finitefutility Previously the sim card works immediately in another Pixel with stock OS, and another sim did not work in my phone.
finitefutility I tried both a factory reset and have gone back to stock OS, both did not make a difference.
finitefutility I don't think it's carrier related as my sim works in 2 different phones immediately?
If you have tried your SIM card in multiple phones, and it doesn't work in only your 4a5g, and you have tried a different SIM in your 4a5g but that doesn't work, and you have tried two different OSs (GrapheneOS and the stock Pixel OS) on your 4a5g, then (a) you've done a lot of careful debugging work, but (b) it sounds as if the most likely cause remaining is a hardware failure on your 4a5g, probably the cellular modem. If part of a device is going to break, it can often break when a device is power-cycled.
finitefutility Could it be possible a SIM is defective in just one phone?
In theory, yes.... maybe one of the contacts is scarred or corroded in exactly a way that matches a flaw in the phone's SIM contact array. But that would be a very unlikely event. Where I live, most carriers are willing to issue a replacement SIM for no cost or a minimal cost, so you might try that.
But I'm afraid the most likely situation is a hardware failure in your 4a5g.