It led me to believe that the iPhone had crashed and needed to start over. have been many years since this last happened to me and at that time w like using an iPhone with a home button. To start an iPhone 6 or later, hold the Home button and sleep / wake button for a long time Until the iPhone starts again. But what do you do on an iPhone, e n iPhone X S or a new iPad Pro that does not have a home button?
Apple gives the answer to this support page, and that's nothing I guessed. If you're using an iPhone 8 or later, quickly press and release the Volume Up button, then tap and release the Volume down button, then press and hold the Page button on iPhone (or Power button on iPad Pro) until the device restarts. The first time I tried this with my iPhone X S nothing happened. But the second time I tried this strange combination, it seemed and my iPhone restarted. And probably at restart I saw that it was fully charged – so this was a kind of crash, not a dead battery.
As the support page, you also note whether you are using an iPhone 7 or iPhone 7 Plus, the solution is to hold down both the volume down button and the side button until you see the Apple logo indicating that the device will reboot.
When using this method to reboot iPhone, you should not lose data. You just force iPhone to turn off and then restart.
Hopefully, it will be a long time before I need to do something like that again, but at least I know what to do. And you do that too.