Force restart iPhone X, iPhone XS, iPhone XR, iPhone 11, or iPhone 12:
Press and quickly release the volume up button, press and quickly release the volume down button, then press and hold the side button. When the Apple logo appears, release the button.
Force restart iPhone 8 or iPhone SE (2nd generation): Press and quickly release the volume up button, press and quickly release the volume down button, then press and hold the side button. When the Apple logo appears, release the button.
Force restart iPhone 7: Press and hold both the volume down button and the Sleep/Wake button at the same time. When the Apple logo appears, release both buttons.
Don't panic its not the end of the world maybe just a simple boot loop , If the hard reset fails , connect the iPhone to a computer and log into your iTunes. You can use iTunes to reinstall the software on your device and restore it to its default settings. You might need to do this if you’re having problems with the device (for example, if it freezes or stops responding frequently)