Detect and destroy a 2D collider if I click with mouse on it

I have a game and I must destroy a ball (2D sprite with 2D collider) that bounce if i click on it… I have already tried some solutions find on the net but they doesn’t work.

Just use:

void OnMouseDown() {
destroy(NameOfYourGameobject) 
}