Not sure what's wrong with the script

So this script is supposed to create a new randomly placed gas canister after the player triggers the 2d collider around it. But the gas can isn’t destroyed after the player touches it,(I have a collider around it set as trigger). Also the sidebar thing showing objects shows multiple objects being created for seemingly no reason, but they aren’t showing up on screen.

using UnityEngine;
using System.Collections;

public class spawncan : MonoBehaviour {
public GameObject gascan;
public int numofcans = 1;

// Use this for initialization
void Start () {
    Vector3 start = new Vector3 (10,10,10);
    Instantiate(gascan, start, Quaternion.identity);
    
}

// Update is called once per frame
void Update () {

    if (numofcans == 0)
    {
        Vector3 pos = new Vector3(Random.Range(-35, 35), Random.Range(-25, 25), 10);
        Instantiate(gascan, pos, Quaternion.identity);
    }


}
void OnTriggerEnter2D(Collider2D other)
{
    if (other.gameObject.CompareTag("Player"))
    {
        Destroy(gascan);
        numofcans = 0;
    }
}

}

With this code you will destroy the gascan reference and not the object you have instantiated.

The solution is to declare a local GameObject that you will set to the instantianted GameObject returned by the Instantiante function.

private GameObject m_GasCan;

m_GasCan= Instantiate(gascan, start, Quaternion.identity);

And then destroy it :

 Destroy(m_GasCan);

Let me know if it worked.