Deleting objects one by one

So i have a row of cubes. I want to collide into them and when i do they get destroyed.

void OnTriggerEnter(Collider coll)
{

  if(coll.gameObject.tag == "Buns")
 {
     incube = true;
 }

}

void Update()
{

if (Input.GetKeyDown(Keycode.lol)&& incube == true)

{
//but how to distroy object? Destroy(gameObject); yea i know but how to tell what im colliding with at the moment. I dont wanna break every cube at once. Also they randomly spawn so dont say “Give each a number” or something lol
}

}

How to delete the object im colliding with when i push buttons

Use OnCollisionEnter(), in a way such as:

void OnCollisionEnter(Collider other){
          if(other.tag == "buns"){
              Destroy(other.gameObject);
       }
}

When you are within the OnCollision loop, you can access both the gameobject whose script this is by using the keyword this or the other gameobject using the name that you give to its collider. In this case other.

Hope it helps!