Try to open Device manager by right-clicking the Windows logo on the taskbar.
On the device manager, double-click display adapter to expand it.
After expanding, right-click GTX 1050 then click uninstall driver.
Next, restart the system so Windows can reinstall it.
After that, test your games.
Report back the results here afterward.
Thank you.