This option is the most recommended when you cannot enter the Windows settings menus. But since safe mode is contained within the Windows 11 recovery environment, the first thing to do is enter this Windows environment manually, that is, using the buttons or keys on the PC.
This varies depending on the make or model of the computer.
Turn off the computer with the on / off button. Once done, turn it on and off again. Repeat the same process two or three more times to activate the Windows 11 recovery environment.
Turn off the computer. Then turn it on and immediately press the ESC key (or F11 depending on your HP model) repeatedly until the Windows 10 recovery environment screen appears.
After performing this step, just follow the instructions described in sections 3, 4 and 5 above.