this seems pretty common. some people reporting disable fast startup will help (you can find that setting locked in grey in the "change what power buttons do" under control panel / power and then in the screen click change advanced settings to access the checkbox.
another solution doig the rounds is to reset in registry the service start value for i8402prt.sys, which should be changed from 5 or 3 to 1. this will force it to load initially. it is entirely possible the kb is fine in the bios, then windows loads up the various USB drivers and something hogs the hardware you need to run the kb. then windows loads back the ps/2 driver so you think your machine is "fine" but clearly the kb is not responding, then you restart and it works because, perhaps, restart force-loads the boot sequence slightly differently to cold start or resume etc. Anyway, its a very old bug stretching back to windows 8, and if you set the start value to 1, the ps/2 kb gets loaded in earlier and sticks around, fending off USB newcomers, and lets you use your laptop kb properly which (surprise) is more likely to be a PS/2 kb than a USB device. Oh, modernity is a slow business.....I doubt MS really thought laptops with PS/2 would still be in service 20 years later.