How to reply level or any level

Godot Version

4.4

Question

I have this game which has levels and I made a game over screen and when I die I want the game over screen to play and when I press reply how do I make it go to the last scene it died at, how do I make the player restart at the level it died and does the same for the other level?

heavily depends on how you set up your project, if you are selecting levels by change_scene_to_file then you can use reload_current_scene()