This method will only work if you backed up your iPhone to iTunes and know the passcode.
iPhone X, 8, and 8 Plus: Press and quickly release the Volume Up button, then the Volume Down button, and then press and hold the button on the right-side of the phone until the phone reboots to the recovery screen. iPhone 7 and 7 Plus: Press and hold Volume Down and the Power Button at the same time. Keep pressing until the phone reboots to the recovery screen. iPhone 6 and earlier: Press and hold the Home and Power buttons at the same time until the phone reboots to the recovery screen.
If you see Update as an option on the Recovery Mode screen, click it to see if it gets you back into your phone. If updating doesn’t work, continue with this method.
If you see Update as an option on the Recovery Mode screen, click it to see if it gets you back into your phone. If updating doesn’t work, continue with this method.