It seems my reply disappeared on this forum.
Start your laptop and as soon as you see the HP logo screen, repeatedly press the Esc key on your keyboard.
On the resulting startup menu, press f2.
On the HP PC Hardware Diagnostics menu, click 'Component Tests'.
Then select Power - Battery and perform the full battery test to check if any hardware error is indicated.