It could either be bootlooping or there’s some sort of error in it. Try force restarting your phone. Just press and quickly release the volume up button, then press and quickly release the volume down button, then press and hold the side button until the Apple logo appears. If that doesn’t work, allow it to charge for about 30 minutes, then try the same steps again. If that didn’t work either, you can restore your iPhone: Restore your iPhone, iPad, or iPod to factory settings - Apple Support (Note: This will erase everything on the phone, not including your eSIM). If it still doesn’t work, you might have to contact a professional, or Apple Support to fix it.