Hi,
I assume you've tried On the iPhone hold down the Sleep/Wake Button and Home button together until the Apple Logo shows. Then On seeing this Apple Logo release both buttons ,and the iPhone will reset , which has been known to clear most glitches.
Can you Try your Sim in another phone as a process of elimination to rule out the phone or sim that may be at fault.
If the sim works ok in another phone then if the iPhone is under 12 months old you could have a diagnostic run at your most local store.
Https://www.apple.com/uk/retail/geniusbar/
Current Phone >
Samsung Galaxy s²⁵ Ultra 512gb.