OnCollisionEnter is not working for me!!

Hello there I’m trying to use OnCollisionEnter to destroy an object (just like collecting a coin), and I have 2objects and both of them have rigid body and colliders I have added my script to one of them and the name that I wrote is the name of the other object which doesn’t have the script. I’m trying to destroy this gameObject whenever it was hit by the other gameObject’s collider . But the script doesn’t work. Please help!!! Thanks!!

public class DestroyCubes : MonoBehaviour
{
    void OnCollisionEnter (Collision col)
    {
        if(col.gameObject.name == "Cube")
        {
            Destroy(col.gameObject);
        }
    }
}

Put a few Debug.Logs in there to find out what exactly is not working.

public class DestroyCubes : MonoBehaviour
{
  void OnCollisionEnter (Collision col)
  {
    Debug.Log("OnCollisionEnter works.");
    if(col.gameObject.name == "Cube")
    {
      Debug.Log("The GameObject name is Cube.");
      Destroy(col.gameObject);
    }
  }
}

Then you can continue to investigate.