Add this script into your enemy. It will reset the scene which in theory will bring the player back to start. Remember to call the UnityEngine and UnityEngine.SceneManagement API services at the start. Also, make sure to have the player tag on the player, so the scene won’t restart if any GameObject collides with the enemy.
// Initiates when something collides with enemy
void OnTriggerEnter2D(Collider2D collider) {
if (collider.gameObject.CompareTag(“Player”)) {
{
SceneManager.LoadScene(SceneManager.getActiveScene().buildIndex);
}
}