If you take the iPhone in for service, the first thing that the tech will do is perform a Forced Restart. So, it would make sense to try this first.....before.....you take the phone in. It might save you a trip.
Force restart iPhone - Apple Support
Unfortunately, users tend to do this incorrectly. Here's how to do it the right way:
Quickly press and release the Up Button
Quickly press and release th Down Button
Hold the Side button in for at least 20 seconds while you ignore the "Shut Down Slider' and keep holding the Side Button in until you see the Apple logo appear in the center of the screen. Then....release the Side Button.
If the Forced Restart does not help after a few tries, there is a hardware problem with the iPhone that will require service at the Apple Store / Genius Bar or an Authorized Apple Service Provider.
You can find a list of authorized shops in your area using this link:
Find Locations