The error reported in first post can only occur if you have a UEFI BIOS's and are booting the media as a UEFI device, then trying to install to a Legacy MBR hard drive format without first clearing the hard drive to allow Windows to reset the format.
If this is the case then using flash stick installation media it needs to be specially formatted using
Rufus for UEFI/GPT with the settings as shown below:

Then power up pressing the BIOS Boot Menu Key to boot the installation media as a UEFI device, choose Custom install, delete all partitions down to Unallocated Space - or the wipe which only needs quick Clean and not zero-fill Clean
All which is overkill - then click Next to autoformat and begin install.
The error you got proves you have a UEFI system which is the modern BIOS replacement and offers features including better security and stability.
If any problems report back error text and numbers, and the exact settings in BIOS setup/UEFI firmware for UEFI, Legacy, CSM, Secure Boot and Boot Priority order.