OntriggerEnter acting weird

public GameObject player;
public Transform target;

private void Awake()
{
    player = GameObject.FindWithTag("Player");
    
}
private void OnTriggerEnter(Collider other)
{
    if(other.gameObject.CompareTag("Player"))
    {
        Teleport();
        Debug.Log("Teleporter Activatge");
    }
    
   
}
private void Teleport()
{
    player.transform.position = target.transform.position;
    Debug.Log("Teleported");
}

This is all the code every thing works but not teleporting my player to target location.
Weird thing is all the debug.log act normal.

private void OnTriggerEnter(Collider other)
{
if (other.gameObject.CompareTag(“Player”))
{
cc = other.gameObject.GetComponent();
cc.enabled = false;
other.transform.position = target.transform.position;
cc.enabled = true;
Debug.Log(“La”);
}

}

For anyone having same issue it was CharacterController problem