unity – How to rotate the transform only on the Y?

private Update()
{
                // Here the transform player should rotate facing the opposite direction.
                // Determine which direction to rotate towards
                Vector3 targetDirection = targetToRotateTo.position - transform.position;

                // The step size is equal to speed times frame time.
                float singleStep = rotationSpeed * Time.deltaTime;

                // Rotate the forward vector towards the target direction by one step
                Vector3 newDirection = Vector3.RotateTowards(transform.forward, targetDirection, singleStep, 0.0f);

                // Draw a ray pointing at our target in
                Debug.DrawRay(transform.position, newDirection, Color.red);

                // Calculate a rotation a step closer to the target and applies rotation to this object
                transform.rotation = Quaternion.LookRotation(newDirection);
}