Try performing a soft reset by holding down the power button and volume down button simultaneously for about 10-15 seconds. This can sometimes help if the device is stuck in a boot loop.
Boot into Safe Mode: If a third-party app is causing the issue, you can try booting your phone into Safe Mode. Press and hold the power button, then long-press the "Power off" option on the screen. This should give you the option to boot into Safe Mode. In Safe Mode, only pre-installed apps will run. If your phone boots up normally in Safe Mode, it's likely that a third-party app is causing the problem
Wipe Cache Partition: Boot your phone into recovery mode by holding the volume up button and the power button simultaneously. From there, you can select the "Wipe cache partition" option. This clears temporary system files that might be causing issues
Factory Reset (Hard Reset): If the above steps don't work, you might need to perform a factory reset. This will erase all data on your phone, so make sure you have a backup of your important data. To perform a factory reset, boot your phone into recovery mode and select the "Factory data reset" option
If none of the software troubleshooting steps work, it's possible that there's a hardware problem causing the boot loop.