I accidentally used
/spawnpoint in the end in Creative Mode. Now, I keep respawning in the end, and my end portal won’t send me back to the overworld. What can I do to get back?
/execute in minecraft:overworld run teleport @s X Y Z, replacing
Z with the coordinates in the Overworld to teleport to (if you know them). Warning, this may spawn you inside a wall, and you will have to dig yourself out (easy in Creative, hard in Survival). If you don't want this issue, please use the 2nd answer below:
/setblock ~ ~ ~ end_portal to set the block at your position to an end portal. You will immediately be registered inside it and be sent back to your world spawn in the Overworld.
You can modify your player.dat file to get back to the overworld.
For this you'll need an NBT editor which can edit Minecraft's .dat files. I recommend NBTExplorer for this. It's available for both Windows and Mac.
Download and install NBTExplorer (or your editor of choice but I'm writing this with the assumption of NBTExplorer) and locate your player.dat file. This may be in the level.dat file of your world instead so if you're playing a singleplayer world check there first as it will override any player.dat files it finds. If it's in the level.dat file look for a tag called "Player" and expand it out. You're looking for a tag called "Dimension". Edit that to the overworld. (If your version has it with the word end typed out or minecraft:end or something similar, replace the word "end" with "overworld". If your version just has a number set it to 0 for the overworld.)