I'm assuming there's code that builds the level on startup based on the level variable. If that is the case, just use the "restart layout" action.
on start of layout, the level variable is 1. After completing the 1st level, the level variable sets to 2. If i die on level 2 and restart the game, the game restarts on level 1.