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>

I'm still using Multiverse and their portals and it works just fine. However, Multiverse uses player names, not selectors. The goal of the portals isn't using commands or buttons, but actual portals

What you'll want to do with them is simple:

  1. Create a small WorldEdit region that should serve as a portal. It can be on the ground to jump in or standing like a Nether portal to walk through.
  2. While you have your desired region selected use the command /mvp create <some distinct name>. I'm usually naming them sourceworldtargetworld (e.g. MainNether for a Nether portal), so I don't have to look them up when I make changes.
  3. Teleport yourself to the target world/location (/mvtp or a home or whatever else you have there) and connect the portal to that location: /mvp modify dest here. This will use your current location as the destination of that portal. You can as well use coords or even other portals as destination, but from my experience it is best to go with your current location.
  4. Create a way home. You need another portal from the target world back to the source world. Just repeat steps 1 - 3 for a portal leading back to your home world.

Now your players don't have to use any commands or buttons and you don't have to worry about giving them permissions they shouldn't have. Players can simply walk or jump into the portals and they will do the rest for you. And if you want to allow or deny entry you can use Multiverse's permissions by granting/denying the permission multiverse.portal.access.<portal name>.