Take Out the SIM Card
It’s possible that the SIM Card in your iPhone is the one causing all this trouble.
Try taking out your SIM card from the SIM card tray and see if there’s anything physically wrong with it. See if the SIM tray is in good condition too. You should also check for any water damage or any problems inside the SIM card slot, the SIM card tray, or the SIM card itself.
If there aren’t any visible problems, put the SIM card back on and see if you can connect using cellular data again.