use sunshine obviously! this will get you s-off and unlocked bootloader for any htc 10 version! (Google it if you dont know what it is!)
now that you have s-off how do you install a recovery and gain root...
boot to download mode
turn off your phone then hold volume down and power for a few seconds
once in download mode get your CID, MID, and system version and write them down somewhere, then reboot the phone to system
create a text file named "android-info.txt"
type the following into the txt file replacing the us unlocked oreo info with your own
modelid: 2PS650000 cidnum: BS_US001 mainver: 3.16.617.2 hbootpreupdate: 1 nohardreset: 1
download the latest TWRP img and rename it to "recovery.img"
move recovery.img and android-info.txt to the same folder select them both and add them to a zip folder named "2PS6IMG.zip"
copy the zip you just created directly to the root of your sd card
boot back into download mode using the steps you followed earlier , you should be prompted to flash the zip you just made, flash it, if everything went well you should now have twrp recovery installed.
boot back up, download superSU, or other root apps or ROMS of your choice
boot into recovery, flash away... proffit!