Zend certified PHP/Magento developer

How to put a clean install of Windows 11 on a computer with untrustworthy OEM?

I have a computer that came with Windows 11 installed, but is from a company that has had a reputation for installing backdoors and bloatware in the OS.

Is there a legal route I can completely wipe this manufacturer’s copy of Windows 11, and install a clean, trusted version of Windows, without having to buy a brand new license?