Step 1: Just reinstall windows 11 or windows 10 which ever you have and it fixes it.
https://www.aomeitech.com/windows-tips/factory-reset-windows-11-pc.html
Here's a link on how to do it if you desperately want to play, its not too big of a hassle to reinstall and it keep all your personal files
This article illustrates 2 approaches to reset Windows 11 PC to factory settings, whether your computer can boot into Windows or not.