When iPhone is stuck, you can force restart it so that it returns to a responsive state.
Follow the following steps:
On your iPhone 8 or later, including iPhone SE (2nd and 3rd generation)
- Press and quickly release the volume up button.
- Press and quickly release the volume down button.
- Press and hold the side button until you see the Apple logo (this takes around 10 seconds).
If your iPhone won't turn on or is frozen - Apple Support
Then, delete the update from your iPhone using the following steps:
- Open Settings > General > iPhone Storage
- Find the update in the list of items that use storage on your iPhone. It will be titled by the version of the update (e.g. "iOS 17.5").
- Click on the update. Then select "Delete" and confirm the deletion.
- Restart your iPhone as you normally would (press and hold the Side Button and one of the Volume keys concurrently, then Slide To Power Off).
- Once iPhone restarts, try downloading and installing the update again.