This normally happens due an on going cumulative window PC update, caused by a device driver or hardware performance issue.
Try the following methods to fix your problem
In this case i will use windows 10
when your Windows PC shows a black screen , it is a sign that something is wrong and has to be fixed. Go to your keyboard and press these combinations Ctrl+Alt+Del. This will take you straight to a blue screen with Lock, switch user, Change password and task Manager Windows is displayed as shown below. Move your mouse cursor to the bottom right corner then click power button and select Restartto restart your PC .
At times you have to force shutdown your PC by pressing and holding your Computer’s power button or removing the battery if is removable to shut it down . Wait for around 5 seconds before starting your computer normally. Check for any changes.
Press Win+Ctrl+Shift+B hotkey combination to restart your PC’s graphics drivers which normally brings problems. This resets your graphics drivers.
Use safe mode to fix
To do this click power off tab then press shift key+ Restart until the PC turns off.
follow these steps choose advanced option->troubleshoot->Advanced option->startup settings->Restart then select number 4 for safe mode.
Log in to PC normally then press these combination keys Windows key+X . Click device manager then display adapter. Disable or uninstall the driver then get a new driver online after restart.