Make dying easy! When you die, your dimension and coordinates are saved, you can use /death get_location to, well, get your death's location. That's if you don't want to teleport. Also, if you want NO ONE to teleport, you can disable teleporting in a gamerule /gamerule playerCanTeleportToDeathLocation false (1.21.10 and below, /gamerule enhanced_death:player_can_teleport_to_death_location 1.21.11 and up)

