Hi, I set my PC to the default settings, so I deleted everything including Mineraft windows version. Do you happen to know how I can get it back without paying again
If you bought it from an online store, you can simply reinstall it using your account.
You have to sign in again with the same Microsoft account that you used before.
In the Microsoft Store with the same account from when you bought it on minecraft.com, then there.