It doesn't hurt to try a Forced Restart.
- Press and quickly release the Volume Up Button
- Press and quickly release the Volume Down Button
- Press and hold the Side Button until you see the Apple Logo
(If performed correctly, you should only see the Power Off slider, not the Emergency SOS/Medical ID slider. But don't use the Power Off Slider, keep holding past that until the screen goes black and the Apple Logo appears, which can take up to 30 seconds.)
But if that doesn't work this would be a hardware failure with the digitizer (display) that would need to be replaced at the Genius Bar. Genius Bar Reservation and Apple Support Options - Apple