You don't need to log out or delete the Windows license before formatting. The license will remain tied to your Microsoft account, and you can reactivate it when you log in to your account after formatting. The Windows activation process will automatically detect the license and activate it for you. Simply log in to your Microsoft account when you've finished formatting, and Windows should automatically activate.
The retail Windows license is encoded in your account, so even if you reset your computer, Windows 10 activation won't be affected, and you won't need to buy a new key, as your license is already preserved.
If you format your drive, you won't lose your product key. Formatting only erases the data on the drive, leaving the operating system and installed software intact.
If you format or delete the computer, including the operating system, all information about the old operating system will be removed, and you'll need to reinstall and enter the license key. However, you can recover your product key from your Microsoft account if you forget it.
Formatting your drives and partitions will allow you to safely erase all data on them, including Windows. This will not affect your Windows license, so you can still reinstall and activate Windows on the formatted drives.
To prevent computer crashes and formatting failures, use a professional and reliable tool like Qiling Disk Master Free for safe and fast formatting.
Qiling Disk Master is highly compatible with Windows systems, hard disks, and file system formats, allowing for efficient formatting and utilization of unallocated space to extend Windows 10.