Implementing a manual respawn system: Resetting character position via Input Event.

I’m learning and trying to make my character respawn at a fixed location when I press a certain button (later, a specific scenario or situation will trigger the respawn), but currently I only know how to create and assign variables dynamically, not how to trigger it. Could anyone guide me on the basic steps for respawning at a desired location (for example, completing a game level or returning to a previous location when a button is pressed)? I would be very grateful.