Then, were I you, if you already have a fresh Windows 10 ISO file to hand (or Windows 11 if you want to try a direct upgrade, but if it doesn't work then punt back to a Windows 10 ISO), I'd try:
Doing a Completely Clean (Re)install of Windows 10 Using Media Creation Tool to Fetch the Win10 ISO File
Since I presume you already have the ISO file, you can skip the steps related to doing the initial download of same.
If you do not have a fresh ISO file, and want to make things a bit simpler, then try:
Doing a Completely Clean (Re)install of Windows 10 Using Media Creation Tool to Create Bootable Win10 Install Media on a USB Thumb Drive
I tend to favor the ISO method simply because I like having an ISO file at hand for other repair installs should they become necessary, though those can be done using the bootable media as well. The choice is yours.
After you have a brand spankin' fresh instance of Windows, restore your user data and any programs you may use.