If clean fails, try typing attributes disk clear readonly while the disk is selected. This removes software-level locks preventing the installation. Best Practices for a Clean Install
This creates an EFI system partition and a primary partition for Windows. Adjust sizes if needed. diskpart windows 10 install
There are several reasons why you might want to use diskpart when installing Windows 10: If clean fails, try typing attributes disk clear