I found a fix for it
Apparently that's a known issue from one of the last windows 10 updates:
https://www.zdnet.com/article/windows-10-update-is-freezing-games-microsofts-fix-uninstall-it-for-now/
Steps to fix it:
- in search bar type in
- windows update settings
- view update history
- uninstall updates
- top right hand corner in the search bar where it says search installed updates copy and paste this in search bar KB4482887
- then click uninstall
- restart computer and thats it