Help my script is causing a infinite loop

I followed a tutorial but when i press play it creates a bunch of the player (The tutorial was about Death and Respawning)

These are the codes that are the issue:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerDeath : MonoBehaviour {
private void OnCollisionEnter2D(Collision2D other) {
if (other.gameObject.CompareTag(“Enemy”)) {
Destroy(gameObject);}
LevelManager.instance.respawn();
}
}
:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class LevelManager : MonoBehaviour {

public static LevelManager instance;
public Transform respawnPoint;
public GameObject playerPrefab;

private void Awake() {
instance = this;
}
public void respawn () {
Instantiate(playerPrefab, respawnPoint.position, Quaternion.identity);
}
}

I’m not an expert on instantiation, but, if it helps, I used a more illusion-esque method to death. I created a bool for locking my character (so all my movement/control is limited by an if that bool is not activated), so they can’t move while dead. Then I disable their sprite renderer so it’s not shown, move it back to the respawn position, then enabling back their sprite renderer and disabling the lock, so the character can move again.

public bool locked = false;

void FixedUpdate()
    {
        if (!locked)
        {
            //Bla bla bla, movement stuff such as moving and jumping
            }
        }
    }

private void OnTriggerEnter2D(Collider2D col)
    {    
        if (col.gameObject.tag == "Hazards")
        {
            //Lock movement
            locked = true;
            //Stop all movement (rb2d is my RigidBody)
            rb2d.velocity = new Vector2(0f, 0f);
            rb2d.gravityScale = 0;
            //Disabling the sprite renderer (sprite is a variable with a GetComponent)
            sprite.enabled = false;
            FindObjectOfType<AudioManager>().Play("playerDeath");
            //Respawn Point
            trans.position = startPos;
            //Enabling back the sprite and the movement (gravity is a variable I use and
            //manipulate in the inspector, but if you have no gravity changes, you can set
            //it back to your original gravityScale)
            sprite.enabled = true;
            rb2d.gravityScale = gravity;
            locked = false;
        }
    }

Sorry if it’s messy, I have it organized differently in my actual code, but it can be an alternative you can use; also, you can call Coroutines if you want to give a little time before respawning; I hope it helps!