Some users faced a problem with the Airplane Mode too. When they switched off Airplane Mode, their phone ended up losing cellular access. Some users feel that the problem is limited to a specific set of models, while others feel that there is link among the models that are facing this problem.
Solution 1: Restart your Device
Restarting the device fixed the problem for many users. So try to restart your iPhone 7 and check if cellular access returns on your phone.
Solution 2: Reinsert the SIM
If restarting the device did not help then try switching off your device and then reinserting the SIM.
It is being said that the users affected by this problem have a phone in which the SIM tray may be lose or askew. If you end up facing this problem very often then you can consider taking your phone to the Apple store and you may be able to get it fixed or Apple may even replace your device.