How to rotate towards a target but only on the y axis ?

This is rotating facing the target camFreeLook but also with the x and i want the transform to rotate only on the y. what should i cahnge/add to this working code so it will rotate only on the y ?

private void Update()
{
transform.rotation = Quaternion.RotateTowards(transform.rotation,
    Quaternion.LookRotation(camfreelook.transform.position - transform.position),
    rotationSpeed * Time.deltaTime);
}

This is a solution for a 2D transform.lookAt(), but it should work the same:

 transform.up = target.transform.position - transform.position;

Here’s the original question.