Hello Yousi,
Thanks for reaching out here in the Microsoft Answers Community.
"Resetting" windows from settings reuses system files from the previous system, so if the malware is in the system files, resetting will not remove it. Replacing the hardware will not remove the rootkit (unless it is the hard drive, as the data, including that piece of malware, is stored on it).
Based on the situation, I recommend copying your personal files to external storage (like USB sticks, external hard disks, and memory cards). Then, you need to perform a clean reinstallation of Windows 11, which erases all the data on the hard disk, and starts you from scratch.
To do so, please prepare a USB stick that is at least 8 GB in size (do not use the one with your backups, since it will be erased), then download and run the Windows 11 Media Creation Tool on another computer. Follow the instructions, and when selecting the media type, please select "USB stick", and then select the drive letter the USB stick is in.
After creating the installation media, please plug it into your computer, and boot from it in UEFI mode. The exact procedure differs among motherboard manufacturers, so please refer to the user manual for details.
Also, please check the following BIOS options, as some motherboards use RAID mode by default which needs specific storage drivers that may not be compatible with the latest version of Windows:
SATA controller mode: Change to AHCI mode (even if there is no such disks)
NVMe RAID mode: Turn off
Intel Rapid Storage Technologies: Turn off
Disclaimer: Microsoft provides no assurances and/or warranties, implied or otherwise, and is not responsible for the information you receive from the third-party linked sites or any support related to technology.
If you are going to modify BIOS Settings, please back up all your personal files first to ensure you do not lose data.
After booting, please select "Install now". Follow the instructions, and when selecting the installation type, select "Custom: Install Windows only". On the next installation screen, please delete all the partitions (including EFI, reserved, and recovery ones) in your system disk. Select the unallocated space and select "Next". The installer will partition your system disk automatically.
Please refer to the "Clean install of Windows 11 using installation media" section of this support article for further details.
Disclaimer: At this point, we have exhausted all troubleshooting and I recommend that we try to perform a clean install to get your computer back into a working condition. Please ensure that you backup any important data, including Documents, Pictures, Videos, and more.
Thanks for your patience and understanding.
Best Regards,
Sheng G. - MSFT | Microsoft Community Support Specialist