Issue with pick up

I have a simple pick up object which the player picks up and the it’s supposed to the the manager script to do something but it doesn’t

Void OnTriggerEnter(collider other)
{
     If(other.gameobject.comparetag("Pick up"))
        {
           GameManager GameManager = FindObjectOfType<Gameobject>();
GameManager.EndLevel(false);
        }
Debug.Log("pick up collected");
}

I do have other things in the same script that calls for the game manager and work fine it’s just this bit doesn’t seem to work and just so you know the debug bit works

if you put the debug inside that if {} does it still print?

Yeap it’s still works.

and no error messages?

should this line search by gameobjects name instead?

GameManager GameManager = FindObjectOfType<Gameobject>();

I managed to get working the script wasn’t responding with the player properly and the trigger system was l layered wrong