If the restart does not clear this….
If you do not have a current backup, try to get one.
Then…
Clear Safari saved data.
Any add-on security apps, or add-on “coffee shop” VPNs, add-on ad-blocking extensions, or other such add-ons installed? If so, remove all of those.
Test again.
Could well be the phone hardware is also failing. A failing display and digitizer can cause touches to be missed, and can cause other touches to be registered; “ghost touches”. Or can be problems caused by a failing battery, as mentioned in a reply above.
Hacks are rare and targeted, based on available reports. Possible yes, but less likely as a cause of problems. If you’re a potential target — if you are an investigative journalist, political dissident, senior in private or government entities, with access to classified or sensitive data, affiliated with or on active duty with a military, or with access to great wealth, or other analogous risks, then you will want to take steps to review your own security.