Simple Way to Remove a Single Object on Click/Touch

This is, I’m certain, an incredibly dumb question. I’ve been trying to learn Unity, and have followed some tutorials to make some simple games like a Breakout Clone, etc.

I’m now trying to make a simple hidden object game, and I’m trying to write what should be the easiest script in the world – on tap/click I want the item that is tapped/clicked to be destroyed.

The problem is, the way I thought I would go about doing that isn’t working:

void Update () {
		
		if (Input.GetMouseButtonDown (0)) {
				Destroy(gameObject);
		}
		
	}

When I attach this script to all of the items to be tappable/clickable, what happens is if I click any one of them, all of them vanish at once.

I would be very grateful if someone could help me with the simplest way to make it so only the object I click on disappears. I tried using ‘this’, but that seems to destroy the script (which makes sense), not the object itself.

Thank you so much!

I should note that this is 2D and in C#.

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour {
    void OnMouseDown() {
        Destroy(gameObject);
    }
}

if(Input.GetMouseButtonDown(0))
{
Vector2 mousePos = new Vector2(Camera.main.ScreenToWorldPoint(Input.mousePosition).x,Camera.main.ScreenToWorldPoint(Input.mousePosition).y);
RaycastHit2D hit = Physics2D.Raycast(mousePos,Vector2.zero, 100f);
if(hit.collider != null)
{
Destroy(hit.collider);
}
}

Add this to your main camera, and make sure that the objects you are destroying have colliders on them.