Most likely neither. It sounds like a carrier problem.
But: When you turn Airplane Mode off, then on, you need to wait 30 seconds between off and on. Shutdown and restart takes more than 30 seconds, so that is why it works. And the reason it works is it starts a new network scan.
This most commonly occurs when you lose signal for 5 minutes, and the phone stops continuously scanning to reconnect to save battery. Examples might be an interior room in a hotel or office building, an elevator, visiting a cellar, or in a US National Park (which intentionally do not have cell coverage) and some state parks.
One setting to check: Settings/Privacy & Security/Location Services:
- Location Services must be on
- Then, in Location Services/System Services: Cell Network Search must be on