How can I make an object to rotate to his original rotation but only once ?

void FixedUpdate()
    {
        int layerMask = 1 << 8;

        RaycastHit hit;
        // Does the ray intersect any objects excluding the player layer
        if (Physics.Raycast(transform.position, transform.TransformDirection(Vector3.forward), out hit, Mathf.Infinity, layerMask))
        {
            if (!raycastSucceed)
                Debug.Log("Did Hit");
            raycastSucceed = true;
            Debug.DrawRay(transform.position, transform.TransformDirection(Vector3.forward) * hit.distance, Color.red);

            RotateGameObject(hit.transform.position, objToRotateLookAT);

            if(Vector3.Distance(transform.position, hit.transform.position) <= distanceToInteract)
            {
                anim.SetBool("Pickup Item", true);
            }

            originalRotFlag = false;
        }
        else
        {
            if (raycastSucceed)
                Debug.Log("Did not Hit");
            raycastSucceed = false;
            Debug.DrawRay(transform.position, transform.TransformDirection(Vector3.forward) * 1000, Color.yellow);

            if (objToRotateLookAT.rotation != originalRotation && originalRotFlag == false)
            {
                objToRotateLookAT.rotation = Quaternion.Lerp(objToRotateLookAT.rotation, originalRotation, originalLookSpeed * Time.deltaTime);
            }
            else
            {
                originalRotFlag = true;
            }
        }
    }

At this part it’s never getting to the else an the flag is all the time false so it keep rotating it to the original rotation. but I want it to rotate to the original rotation once and when it’s getting to the original rotation then set the flag to true.

if (objToRotateLookAT.rotation != originalRotation && originalRotFlag == false)
            {
                objToRotateLookAT.rotation = Quaternion.Lerp(objToRotateLookAT.rotation, originalRotation, originalLookSpeed * Time.deltaTime);
            }
            else
            {
                originalRotFlag = true;
            }

With floats you cannot simply ask if it equals something but must ask if >= or <= unless you implicitly set it without alteration. Another problem that can happen with rotating is the number keeps growing; it wont just reset back to 0 after going > 360. So you will have to monitor what your doing and figure out how to implement it by either resetting after completing rotation or resetting after getting >< then your desired rotation.