Fix 1: Restart your computer as a first step.
It never hurts to restart your computer because many technical issues might be remedied by doing so. If Windows 10 is not responding, this is often enough to fix the problem.
After resuming, test to see if your problem has been resolved.
Fix 2: Scan your computer for viruses.
If Windows 10 is infected with a virus or spyware, it may become unresponsive. So, scan your complete Windows system for viruses. Yes, it will take some time to finish, but it is well worth the effort. Unfortunately, Windows Defender might not be able to identify it, therefore you should try another antivirus program like Avira or Panda.
If malware has been found, follow the antivirus program's instructions to remove it.
Then restart your computer and see whether your program runs again.
Fix 3: Do a fresh boot.
You can use a clean boot to start Windows without any non-Microsoft services running. It will assist you in troubleshooting and determining which program or application is causing the issue.
After rebooting, one by one, enable the deactivated devices to determine which service is causing Windows 10 to stop responding.