How to call unity event once every time my object reach destination in Update()?

bool isUnityEvent;

if (!isUnityEvent)
        {
            if (transform.position == TargetLocation)
            {
                onReachTarget.AddListener(Test);
                onReachTarget.Invoke();
                isUnityEvent = true; 
            }
            if (transform.position != TargetLocation)
            {
                isUnityEvent = false;
            }
        }

Here i already make the unity event trigger once in update, but when i move the TargetLocation and my object reach that destination the unity event doesn’t trigger.

Your transform must have the correct position in your code, it would be better to regulate this via a distance

float dist = Vector3.Distance(transform.position, TargetLocation);
             if (dist < .5f)
             {
                 onReachTarget.AddListener(Test);
                 onReachTarget.Invoke();
                 isUnityEvent = true; 
             }