It's certainly troublesome when your iPhone 12 stops responding and you can't open any apps or restart the device. A useful first step is to perform a force restart; this doesn't erase any data but can often resolve issues when the phone is unresponsive. For your iPhone 12, press and quickly release the Volume Up button, then do the same with the Volume Down button. After that, press and hold the Side button until the Apple logo appears, then release it. This is the best solution that i have opted buddy.