There's the
instructions on the official TWRP site. I probably used these when I first installed TWRP on my Tab 4 10 Pro.
After some desperate googling i found one more (fastboot oem unlock-go) unlock command and now its working.
I used these steps.
1. Prepering files
a) Place files on internal storage:
Rom = lineage-17.1-20221011-UNOFFICIAL-TBX704.zip
Gapps = open_gapps-arm64-10.0-pico-20220215.zip
2. UNLOCKNG THE BOOTLOADER
a) Enable Developer Options (Systems --> About --> Tap "Build Number" 10 times)
b) Tap OEM unlock to enable it
c) Open command prompt.
d) In cmd prompt type without quotes then hit enter: "adb reboot bootloader"
e) In cmd prompt type without quotes then hit enter: "fastboot oem unlock-go"
f) The device will reset and reboot automatically.
g) Don't close cmd prompt and KEEP device connected to computer
3. INSTALLING TWRP (CUSTOM RECOVERY)
a) Copy the twrp-3.7.0_9-0-X704F.img into the Android ADB folder
b) In cmd prompt type without quotes then hit enter: "adb reboot bootloader"
c) In cmd prompt type without quotes then hit enter: "fastboot flash recovery twrp-3.7.0_9-0-X704F.img"
d) In cmd prompt type without quotes then hit enter: "fastboot boot twrp-3.7.0_9-0-X704F.img"
e) Wait for it to boot into TWRP
*** Tablet can now be disconnected from computer ***
4. Install
b) Wipe device (not internal storage)
c) Navigate internal storage to folder that contained the files and Flash Rom, Gapps.
d) Reboot device