OK standard fixes from simple to nuke.
Simple:
Restart your iPhone. Once it's returned to the Home screen, test the issue.
- On an iPhone X or later, or iPhone 8 or later: Press and quickly release the Volume Up button. Press and quickly release the Volume Down button. Then, press and hold the Side button until you see the Apple logo.
- On an iPhone 7 or iPhone 7 Plus: Press and hold both the Side and Volume Down buttons for at least 10 seconds, until you see the Apple logo.
- On an iPhone 6s and earlier, iPad, or iPod touch: Press and hold both the Home and Top (or Side) buttons for at least 10 seconds, until you see the Apple logo
If restarting your phone didn't resolve the issue, be sure to write down your Wi-Fi networks/passwords before this next step. On your iPhone, go to Settings > General > Reset > Reset Network Settings. This will only affect previously connected Wi-Fi networks and passwords, recently used Bluetooth accessories, VPN and APN settings. Now test the mobile data issue again.
(Then sign back into your wifi)
Now the Nuke...
try a back up and restore in iTunes first and see if it fixes it.
Restoring via iTunes will repair the iOS software on your iPhone.
How to back up your iPhone, iPad, and iPod touch - Apple Support
After backing up, restore via iTunes to repair the iOS software. You should test by setting it up as “new” after restoring:
Restore your iPhone, iPad, or iPod to factory settings - Apple Support
If it seems to work OK after setting up as a new iPhone, restore your backup and test again:
Restore your iPhone, iPad, or iPod touch from a backup - Apple Support