Solved! How can I resolve this please? Laptop goes off

Apr 28, 2022
I'm using a HP ProBook 650G1. It recently started going off while in use. This only happens on the battery, it just goes off and won't turn on anymore. Happened the 3rd time today. Mostly happens when the battery is below 40% after a full charge. When I try to turn it back on, it comes on but goes off again while trying to boot, and then, the power button blinks once. Simultaneously, the power led and the charging led also blink once with the power button.
What could be the cause? And does anyone know the solution, please?