Check out example codes for "have something point at the player". It will help you in understanding the concepts better.

Code Example 1

using System;
using UnityEngine;

public class LookAtTarget : MonoBehaviour
{
     public Transform target;
     
  void Update()
  {
       if(target != null)
       {
            transform.LookAt(target);
       }
  }
  
}

Learn ReactJs, React Native from akashmittal.com