Confusingly there are several versions of the "WHB04" and several HAL files to suit but they aren't interchangeable. I have one like the example in the video but that seems to be superseded now. So more recently I bought the current version directly from XHC's AliExpress shopfront - the price is fairly consistent but you might as well buy direct from the manufacturer.
www.aliexpress.com/item/1000001956168.ht...e.0.0.5d294edfWLSNyw
They don't support LinuxCNC natively, which is why the descriptions talk about Mach 3 etc - but the LinuxCNC boys have done a great job writing their own HAL driver. For the "current" model, XHC-WHB04-6, the correct HAL file and documentation is here:
linuxcnc.org/docs/2.8/html/man/man1/xhc-whb04b-6.1.html
My final HAL file is very close to this example in the end. Note that the -4 and -6 versions support 4 and 6 axes. I actually have a -6 used on my lathe but the unused axes don't cause a problem.
For your reference, here's my current HAL file, as used on my lathe. It may not be a reference quality example but it works with gmocappy and Probe Basic.