Hi @Freya Reneigh Luison,
You may have a faulty Power button.
Try disconnecting the power button board cable from the systemboard and then test the button when it is being held operated for continuity by using an Ohmmeter connected to the appropriate cable end connections and pressing the button.
Here’s a link to the [http://h10032.www1.hp.com/ctg/Manual/c03758231|maintenance and service guide] for the laptop.
Scroll to p.93 to view the necessary pre-requisite steps to remove/replace the function board/power button board.
If the button is faulty the part number for the board and cable is 683486-001.
Search online using the part number only to find suppliers of the part. Here’s a link to just one [https://www.ebay.com/itm/683486-001-HP-4545s-4540s-FUNCTION-BOARD-POWER-BUTTON-/173388261021|supplier]. It is only to show you what the part looks like and how much it may cost. There are other suppliers online that may suit you better.