How to create a view angle where the turret can see the enemy and start shooting

This is the script of my turret, how can I create a certain angle of view where the turret starts following the enemy?
like this:

public class Turret : MonoBehaviour
    {
        [Header("ATTRIBUTI")]
        public float speed = 10f;
        public float range = 10f;
        public float fireRate = 1f;
        private float fireCountdown = 0f;
        public float damage;
    
        public Bullet mybullet;
    
        [Header("Unity")]
        public GameObject bulletPrefab;
        public Transform target;
        public Transform firePoint;
        
        public string enemyTag = "Enemy";
    
        Vector3 lastKnowPosition = Vector3.zero;
        Quaternion lookAtRotation;
    
        void Start()
        {
            InvokeRepeating("UpdateTarget", 0f, 0.5f);
            mybullet.Damage = damage;
        }
    
        void Update()
        {
            if (target == null)
                return;
            FollowTarget();
            if(fireCountdown <= 0f)
            {
                Shoot();
                fireCountdown = 1f / fireRate;
            }
            fireCountdown -= Time.deltaTime;
    
        }
    
        #region Shoot
        void Shoot()
        {
            GameObject bulletGO = (GameObject) Instantiate(bulletPrefab, firePoint.position, Quaternion.identity);
            Bullet bullet = bulletGO.GetComponent<Bullet>();
            if(bullet != null)
            {
                bullet.Seek(target);
            }
        }
        #endregion
    
        #region Tracking Update
        void UpdateTarget()
        {
            GameObject[] enemies = GameObject.FindGameObjectsWithTag(enemyTag);
            float shortestDistance = Mathf.Infinity;
            GameObject nearestEnemy = null;
    
            foreach (GameObject enemy in enemies)
            {
                float distanceToEnemy = Vector3.Distance(transform.position, enemy.transform.position);
                if (distanceToEnemy < shortestDistance)
                {
                    shortestDistance = distanceToEnemy;
                    nearestEnemy = enemy;
                }
            }
            if (nearestEnemy != null && shortestDistance <= range)
            {
                target = nearestEnemy.transform;
            }else
            {
                target = null;
            }
        }
        #endregion
    
        #region Follow Target
        void FollowTarget()
        {
            if (target)
            {
                if (lastKnowPosition != target.transform.position)
                {
                    lastKnowPosition = target.transform.position;
                    lookAtRotation = Quaternion.LookRotation(lastKnowPosition - transform.position);
                }
                if (transform.rotation != lookAtRotation)
                {
                    transform.rotation = Quaternion.RotateTowards(transform.rotation, lookAtRotation, speed * Time.deltaTime);
                }
            }
    
        }
            #endregion
    
        #region Gizmos
            void OnDrawGizmos()
            {
                Gizmos.color = Color.blue;
                Gizmos.DrawSphere(transform.position, range);
            }
       
            #endregion  
    }

you can use this code and tweak it.
It is fairly simple , refer to dot product for vectors .
Then you can rotate your turret as needed to shoot

 public Transform turret, player;
public Vector3 targetPos, fw;

// Update is called once per frame
void Update()
{
    //Assuming Z forward

   
        fw = turret.TransformDirection(Vector3.forward);
        targetPos = player.position - turret.position;

        if (Vector3.Dot(fw.normalized, targetPos.normalized) > 0.5) // > 0 Ahead (180 FOV), < 0 behind (180 FOV)  tweak as needed for fov 
        {
            print("Player Detected");  
        }
    

}

Regards