On the phone enable Developer options. More info here.
Find the “OEM unlocking” button and enable.
Reboot phone to bootloader.
Plug phone into computer and computer run
sudo fastboot flashing unlock
Use the buttons on the phone to select and enable unlocking.