1) Set the boot mode of the target machine to UEFI (not Legacy) in the system BIOS. Also in BIOS, make sure Secure Boot is disabled - it must be disabled, or it won't work. Also, if there are multiple storage drives in the system, power down and unplug all of them except your intended boot disk to simplify the install.
2) Create a UEFI bootable installer flash drive. The first part of
this video (from beginning to 12:35 minutes) shows how to do that using
Rufus.
3) Boot the machine using the UEFI boot flash drive. Make sure to select the correct boot partition on the flash drive to boot from (you may have to press F12 or whatever key your particular system uses to choose boot media at startup).
4) After Windows installer boots, choose the custom install option. When you get to the screen showing the drive partitions and formats, if it won't let you create partitions follow the instructions in
this video beginning at 01:23 minutes to create a GPT partition structure. Basically, this video shows you how to use SHIFT-F10 at the right time during the install process to allow you to run DISKPART to clean the install disk and create the GPT partition structure.
5) Complete the install - Windows shouldn't give you a problem at this point. Once Windows is installed, shut down and plug any other system drives back in, and you should be good to go.