Cross-dimension teleportation using command block or datapack?
You can teleport yourself to the end with this command
/execute in minecraft:the_end run tp @s <coordinates>
To the nether with this:
/execute in minecraft:the_nether run tp @s <coordinates>
Or to the overworld:
/execute in minecraft:overworld run tp @s <coordinates>