Respawn is a mod for minecraft forge that allows server ops to set the default spawn/respawn dimension for the server. This mod is fully serversided; clients do not need to install the mod to connect to servers that have the mod, and clients without the mod can use the mod's commands if the server has the mod.
Respawn adds the following commands for server ops (permission level 2+):
/respawn dimension
sets the dimension players with no personal respawn point will spawn/respawn at/respawn disable
disables the Respawn mod and reverts to vanilla behavior (or allows other mods to handle the respawn dimension without Respawn interfering)
The xyz spawn position can be set by running the vanilla command /execute in minecraft:overworld run setworldspawn x y z
(it must execute in the overworld to take effect, regardless of which dimension Respawn is configured to use).
The respawn dimension can also be configured via a serverconfig file, which is generated whenever a new world save is created. This file can be placed in the defaultconfig folder of your minecraft/forge instance to set the default spawn dimension for newly created worlds.
See the readme in the linked github sources for full documentation: