When I press the button it goes to the HP logo and nothing happens. If I turn it off again and start it up, it works
Can be anything.
In general, hardware errors / defects are very popular here. E.g. Thermal problems that hardware has to "preheat" before it can run.
Do you want to know exactly: Off to the technician.