Can you please help me understand why we use local for the second one and also why not use local for the first one
rotation = Vector3.zero;
rotation.y = lookAngle; // rotation around y axis
targetRotation = Quaternion.Euler(rotation); // Quaternion.Euler(0,lookAngle,0)
transform.rotation = targetRotation; // transform.rotation = Quaternion.Euler(0,lookAngle,0)
rotation = Vector3.zero;
rotation.x = pivotAngle;
targetRotation = Quaternion.Euler(rotation); // Quaternion.Euler(pivotAngle, 0, 0)
cameraPivot.localRotation = targetRotation