When I tried to reboot my phone a few days ago, it booted into CSC fastboot mode and it couldn't boot into the OS. I tried Vol down + power off combo to boot into recovery but that doesn't work and after showing the Android Phone screen, it just powers off again.
The CSC fastboot screen is the same as on this image of another phone (same model) having the same issue:

I unlocked the bootloader using fastboot and now it shows FASTBOOT instead of CSC FASTBOOT.

fastboot getvar all
shows 'unlocked: yes', so the bootloader is definitely unlocked.
Then I flashed the stock rom for my phone and even after successfully flashing all required img files, I still cannot boot successfully. I tried this procedure multiple times but nothing works.
I also can't boot into recovery after flashing stock recovery.img or even compatible twrp versions. Flashing works successfully but it shows FAILED when trying to boot. After leaving the phone alone for a day, I connected it to the pc using the usb cable this morning and the battery charging animation showed up and it showed the Bootloader unlocked warning with 'press power off to pause boot'

I got excited or something and pressed the power off button. It then booted into the fastboot mode again as usual. But now it briefly shows the battery animation when I connect it to the charger when it's switched off, and it boots into fastboot mode again.
I tried re-locking the bootloader and trying it again, same with locking it and nothing works. Neither does trying to flash or boot recovery/twrp, or flashing the stock rom again.
The volume buttons are working fine and there was no problem with them before as well. I also opened the device and tried pressing the buttons manually and got the same result.
fastboot getvar all
output:
