how to repair this problem

using UnityEngine;

public class PlayerCollision : MonoBehaviour
{
public PlayerMovent movement;

void OnCollisionEnter(UnityEngine.Collision collisionInfo)
{
    if (collisionInfo.collider.tag == "Obstacle")
    {
        Debug.Log("We hit an obstacle!");
    }
}

}

Its my code, problem is that :
I got notified if my Object hit the gground and Obstacle, but i tagged only obstacle

Check if the ground gameobject is tagged with “Obstacle”.
It should be untagged with “Obstacle”
(Inspector - Tag → See the dropdown list)


I’ve just tried to make a new project and add Plane(ground), Capsule(Player), and Cube(Obstacle)
→ add rigidbody componenet to Capsule and Cube → Make a tag “Obstacle” in Cube and add a script
just saying
void OnCollisionEnter(UnityEngine.Collision collisionInfo)
{
if (collisionInfo.collider.tag == “Obstacle”)
{
Debug.Log(“We hit an obstacle!”);
}
}


It has the result you want.