[Samsung Galaxy Tab A series ROMs, Kernels, Recover] Strachu:
As the installation instructions in the first post are utterly useless and I had to reflash stock vbmeta and recovery at least 5 times to make the TWRP finally work without making the tablet unbootable with stock firmware, I'm attaching the complete instructions to install TWRP alongside stock firmware using Heimdall. The instructions were written and tested for a Linux PC although should work fine on Windows after very minor adjustments.

You will have to factory reset your tablet, so you will lose all your data!

Before you begin I recommend to check the exact firmware you have in case something goes wrong because in that case you will have to flash parts of stock firmware (vbmeta.img or recovery.img). To check your firmware go to settings -> "About tablet" -> "Software information" -> "Build number" - it's the last part after a period. In my case it was T500XXS2ATL1.

The instructions:

Unlock the bootloader. A great guide has been written by DJBhardwaj at https://xdaforums.com/t/guide-sm-t5...4-unlock-bootloader-root-with-magisk.4185993/ (Step 1 and 2)

Download Heimdall from https://github.com/amo13/Heimdall/releases/tag/v1.4.2 (link to a fork given by paziusss). The official version available in ubuntu 18.04 repository failed to connect.

Download and extract recovery.tar from first post in this thread.

Download and extract blank_vbmeta.tar from https://xdaforums.com/t/recovery-unofficial-twrp-3-5-2-for-2020-galaxy-tab-a7-10-4-sm-t500.4358595/. I have attached it to this post for completeness.

Connect USB-C cable to your PC.

Put the tablet in download mode: power off the tablet and then while holding both Volume Up and Volume Down button connect the usb cable. After it loads a warning message press Volume Up. Now you should see "Downloading..." at the center.

Flash the recovery.img and vbmeta.img from steps 3 and 4 to the tablet by typing into terminal:

./heimdall-linux flash --VBMETA vbmeta.img --RECOVERY recovery.img --no-reboot

Restart the tablet into TWRP: press the Power and Volume DOWN buttons and hold them for 7 seconds and then after the display goes blank quickly press and hold Power + Volume UP

In TWRP go to Wipe -> "Swipe to Factory Reset" and then reboot the tablet - if you skip this step the tablet will enter bootloop or just hang during starting.

Wait something like 5 minutes for the tablet to show a welcome screen. Choose the language you want and let it reboot.

Finish the wizard and then (very important - when I skipped it then after reboot my tablet was locked due to non-official firmware) connect to the network and go to settings to see the the "OEM unlocking" options - just like you did just after unlocking the bootloader.

Reboot. That's it. After that you should have both stock Samsung firmware and TWRP working.

I'm not sure all the steps are always necessary but when I skipped any step the tablet either hang on "Samsung" logo during booting, entered bootloop or the devices has been locked allowing for stock firmware flashing.

I saw someone recommend installing in TWRP the "multidisabler" from https://xdaforums.com/t/pie-10-11-s...of-stock-recovery-proca-wsm-cass-etc.3919714/. I have tried it and and after that my tablet just hang on "Samsung" - even after leaving it overnight nothing changed so I skipped it on next attempt. However It's possible that it made some permanent changes to the tablet, so if above instructions don't work try to install the multidisabler after step 8 and give me feedback if that is required so I can update the steps.

If something goes wrong, like bootlooping or tablet become locked you can restore the system back to normal by flashing stock vbmeta.img and recovery.img:

Download stock firmware for your tablet in version already installed from other websites. I got mine from galaxyfirmware.com - seems legit.

Extract downloaded firmware and then extract also file called something like "AP_T500XXS2ATL1_CL20288130_QB36618368_REV00_user_low_ship_MULTI_CERT_meta_RKEY_OS10.tar.md5" (a file starting with AP_)

Extract recovery.img.lz4 and vbmeta.img.lz4. On linux you can do by installing liblz4-tool and then executing:

unlz4 -m recovery.img.lz4 vbmeta.img.lz4

Flash the extracted vbmeta and recovery allowing the tablet to reboot automatically:

./heimdall-linux flash --VBMETA vbmeta.img --RECOVERY recovery.img

The tablet will enter stock recovery. Choose factory reset option.

The system will boot in something like 5 minutes.

Connect to the internet, in android verify the bootloader is unlocked and try installing TWRP again.

@NeilR2 - if you still haven't made it work with stock firmware you can this instructions. It's possible you missed the step 11.​