I've had this happen a lot with my phone on tmobile. I live in a concrete basement apartment where there's no reception and if the phone goes more than 15 hours without any signal I almost always(80%ish) have to call tmobile and have them deactivate/reactivate the sim from their end.
A fix you can try that they swear "usually works" is go to settings/mobile data/network operators/search automatically
If that doesn't work then try settings/mobile data/access point names/menu/reset to default
Apparently these settings can be reset pretty easily when the phone doesn't connect to a network for a bit, but all this might just be a tmobile thing