I have had this issue before and you can try doing a DFU restore. Follow the instructions for DFU, Make sure you are not restoring from the recovery boot menu. (if you see “Connect to mac“ try again)
https://9to5mac.com/2018/10/09/iphone-xs-max-iphone-xr-how-to-power-off-force-restart-enter-dfu-recovery-emergency-sos-video/#:~:text=Step%201%3A%20Connect%20your%20iPhone,hold%20as%20the%20device%20reboots.