Windows 11, Windows 10, and even older versions come pre-installed with a security and encryption feature called BitLocker.
To fix the “Cannot install Windows, BitLocker Drive Encryption is enabled on selected partition” error, suspend BitLocker via Settings or Control Panel, or use your recovery key to unlock the drive.