If you have a problem with the OS, you can try to reset Windows to factory settings.
You'll want to make a USB install drive for Windows 11, or your operating system of choice. For Windows 10 or Windows 11, simply navigate to Microsoft’s Download page and click the “Download Tool Now” button. You’ll want to download and run the Media Creation tool, which will turn any 8GB or larger USB drive into a Windows install disk. If you don’t already have a Windows 10 or 11 key, you can get one cheap or for free. If you have a problem with the OS, you can try to reset Windows to factory settings.