As your MBP shows the login screen the second time, you can reboot it into Recovery Mode to check if the utilities in Recovery Mode are workable this time.
The flashing folder with a question mark on your Mac startup screen is a warning to tell you that your Mac has serious issues stopping it from booting up. You'd better rescue data from your MacBook right now to avoid data loss.
To recover data from an unbootable Mac, you need to use iBoysoft Mac Recovery Mode. It helps you recover files from an unbootable MacBook via only one command.
After getting back the files, you can get about fixing your MacBook that won't turn on.
Here are some ways:
1. Run Disk Utility First Aid
If the utilities in Recovery Mode are available the second time you enter, run First Aid in Disk Utility to check and repair the startup disk. Then restarting your Mac to check if it can boot up properly.
2. Erase the startup disk and reinstall macOS
If First Aid can't fix the startup disk and your Mac still won't start, try erasing your Mac and reinstalling macOS in Recovery Mode.
3. Send to repair
If these utilities in Mac Recovery Mode are not working, you have to contact Apple support or a local repair center to help you check the hardware problems of your MBP, such as startup disk SATA connections, logic board, battery, etc.