Smooth Movement Transition

I am trying to move the an object to the “next” point (0,6) once a certain amount of rotations has occurred. I can get the object to move to the point, but it happens instantly and not smooth like the rotation. I tried using MoveTowards, but haven’t been able to make it work. What could I add?

Here’s what I have currently:

if (rotationCounter < 6) {
   
   timeCounter += Time.deltaTime * speed;

   float x = Mathf.Cos (timeCounter) * width;
   float y = Mathf.Sin (timeCounter) * height;
   float z = 0;

   transform.position = new Vector3 (x, y, z);

   if (buttonDown == true) {

    transform.position = new Vector3 (next.transform.position.x, next.transform.position.y, z);
  
   }

For smooth transitions you would ordinarily use interpolation, or lerping.

bool move = false;
float speed = 1;

void Update ()
{
    ...
    if (buttonDown)
        move = true;

    if (move)
        transform.position = Vector3.Lerp (transform.position, Vector3 (next.transform.position.x, next.transform.position.y, z), Time.deltaTime * speed);

    if (Vector3.Distance (transform.position, next.transform.position) < 0.02 && move)
        move = false;
    ...
}

Try to use Mathf.SmoothDamp();