Recently encountered a bug when looking at some posts, the post that triggered this to happen to me is this meme post. It made my entire phone freeze, disabling the ability to change apps, open the power menu, go to the home screen, or basically anything. Apple changed the method to hard reset phones some time ago, if you don’t know how to reset your iPhone without a functioning UI then read this apple page.
Regular expressions at the input boundary eh? You should give this video a look: https://youtu.be/LLkbzt4ms6M?si=h71e7ZozcZAUGXil