Trying to make my 2d object respawn with trigger

Im trying to make a object re spawn when it falls out of the cameras view. I have set the object im using as a trigger & ive set my players tag to player. Idk what the problem is. Im bad at coding so pls keep the talk simple. Thanks in advance.

[SerializeField] private Transform player;
[SerializeField] private Transform respawnPoint;

void OnTriggerEnter2D(Collider2D other)
{
    player.transform.position = respawnPoint.transform.position;
}

you have forgot to mention who and when is something colliding. simply add this after ontriggerenter:

if(other.transform == player) {

//do something

}