Why does my PC have problems with restart, shut down and games?

My PC has these problems:

  1. When I try to reboot it stays on the reboot screen and nothing happens for more than 10 minutes and when I try to shut down the system the monitor turns off but not the PC.
  2. When I try to start a game on Steam it does not open but if it opens the program does not respond and if I try to shut it down the application does not close (Epic games launch and close games without problems).

I have already tried to reset the PC to factory settings and after the problem recurred I also tried to reinstall Windows but it did not solve anything and then I tried many suggestions that ChatGPT gave me and also updated the BIOS but I continue to have this problem.

PS: HP advises me to change the battery because it needs to be replaced but it has always worked even without it so I don’t know if it could be one of the sources of the problem.