Computer black screens after stepping away from computer for a second, cant wake up without hard reset

My laptop will sometimes black screen while I’m not using it or step away from the computer for a second similar to sleep mode there is not cursor or mouse the screen is just dimly lit black but it doesn’t wake up no matter what I do unless I hard reset by holding the power button which gets annoying losing progress this way. Any solutions please? I am on windows 10.