OnTriggerEnter2D not working

void OnTriggerEnter2D(Collider2D target){
if (target.gameObject.tag == “Player”) {
Destroy (target.gameObject);
}

	}

that’s my code. I have no kinematics checked on my collectable. target object is a rigid body. But still my gameObject is not destroying.
Please help. ,void OnTriggerEnter2D(Collider2D target){
if (target.gameObject.tag == “Player”) {
Destroy (target.gameObject);
}

	}

That’s my code. IsTrigged is checked and other object is a rigid body still can’t destroy it.
Please help me.

your target object needs a collider2d on it as well.

Make sure that the “target” object has 2D physics on it. Meaning a Rigidbody2D or Collider2D.
A normal Rigidbody or Collider will not work with OnTriggerEnter2D.