Amazingly complicated tutorial here.
tl;dr version: Copy the following directories from the old device to the new:
I suggest you also do directory "OldSaves" as well. On my old tablet, "Players" and "Worlds" were both empty, probably because it was running an older version of Terraria.
The entire rest of the tutorial is a walkthrough on how to copy these up to a cloud drive, and back down again. Obviously any equivalent method will also do.
It seems Terraria used to have a cloud save function. I don't see it in the latest version (as of Nov 2019) and have no idea if it still exists or not.