If on Windows 11, get the Windows 11 ISO (Media Creation Link) and download to a USB key.
Start with the USB Key and run Setup on the key.
This should launch the ability to do a Repair Install.
Assuming it launches Repair, try Keep Everything and see if that corrects the issue.
If not, try Keep just Data and then you will need to install your software.
Also, if the computer will at least start, you can also use Windows Reset in Start, System, Windows Update.
The last step would be to back up everything and install Windows fresh.