[Samsung Galaxy S10 ROMs, Kernels, Recoveries, & Ot] J.Michael:
If you want stock ROM, stop thinking about kernel. Stock ROM has its own kernel. If you change the kernel, you do not have stock ROM anymore.

You start with a working tablet. You can boot it and Android will run.

The advice was, next install TWRP. Part of that step will erase all data from the (regular) Android part of the tablet.

Then the instructions describe using TWRP to install a custom ROM.

If instead of a custom ROM, you just want to install Magisk in the stock ROM then, sorry, more decisions.

The standard way to install Magisk is to use the Magisk Manager app to patch the AP.tar file corresponding to your ROM, then use Odin to "flash" the patched ROM. There are other details. Do not try to use just what I have written in this paragraph. Where I'm going with this is, if you patch the original AP.tar and flash it, you will lose TWRP. The original AP.tar file contains a "recovery". TWRP is an alternate "recovery". Flashing the original AP.tar, with or without patching with Magisk, will overwrite TWRP with the original recovery.

I cannot keep straight what has gone on in this thread. I do not know if people have successfully built a new AP.tar with the original "recovery.img" replaced by TWRP (renamed, because the name in the tar file must match the partition name), then use Magisk to patch the 2nd AP.tar, then flash the 3rd AP.tar.

You have to understand that, depending on details of which device you have, Magisk might need to be installed in different places. I believe that if Magisk Manager app is told to patch an AP.tar file for a Samsung device, at least some of the patching is done to the recovery. I believe there are times when it just will not work if that recovery is TWRP.

A way to install Magisk, if you have TWRP, is to take the "magisk.apk" file you chose (again, choices: stable, canary, beta), rename it to (or make a copy with the name) "magisk.zip", and "flash" it through TWRP. I have never done this, I assume somewhere in TWRP there is an option "install a ZIP file".

I do not know if this has any chance of working on a Samsung.

It sounds like @malcolmy has had great success with a custom ROM. He sees benefits to using the custom kernel that comes with the custom ROM. What is not clear to me is whether he is really free to replace the kernel in any other ROM.

TL;DR (yeah, like I suddenly learned to be succinct)

Do not waste time setting up your tablet until you are ready to stop flashing. Many times, flashing requires wiping data. All the time you spent adjusting the font size and installing your 18 favorite apps will be lost.

Read this thread and figure out the most recent recommended way to install Magisk. If you can't imagine living without TWRP, or if everybody in this thread starts by installing TWRP, pick those instructions.

If, once you have Magisk (not just the Magisk Manager app, but Magisk) running, you can't stand having to dance the buttons every time you reboot if you want Magisk again active after the boot, *then* revisit @malcolmy's instructions to install a custom ROM that, among other things, makes it easier to reboot to a Magisk-controlled system.