Destroy(this.gameObject) destroys all the obejcts in the scene, i want only the one that is clicked on

I want to destroy gameobject when they are clicked on, but right now when i click on one all the gameobjects in the scene destorys, how do i fix this?

void Update ()
    {
        ClickedOnAction();

    }

    void ClickedOnAction()
    {
        if (Input.GetKeyDown(KeyCode.Mouse0))
        {
           Destroy(gameObject);
        }
        
    }

This is the code i have right now. And if it has any difference, i have many of the same objects in the scene so how do i fix this?

Your code contains no condition other than mouse pressed, so every gameObject containing this script will of course be destroyed.

If your object has a collider, you can use the event method OnMouseDown() or OnMouseUpAsButton() (more similar to a click on that object) and add the line Destroy(gameObject) there.

This is the whole script for this:

 void OnMouseUpAsButton()
 {
    Destroy(gameObject);
 }

Make sure to give your object a collider (assuming it is a 3D object).
Also see here: Unity - Scripting API: MonoBehaviour.OnMouseUpAsButton()