Finally found a solution that worked, here,. Just make sure you read the instructions carefully, as I got confused on the "second time" bit.
There are various reasons why your screen may stop responding such as faulty updates and crashing apps. Your screen may also just be broken. If you find yourself in this situation, here are the steps to take to turn off your iPhone without using the touch screen:
Press and release the Volume Up button. Do not long-press or hold the button.
Do the same to the Volume Down button. Press and immediately release.
Press and hold the Lock/Unlock button until your iPhone screen turns off, turns on, and shuts off again. Once the Apple logo disappears from the screen for the second time, release the Lock/Unlock button.