how to get a 2d sprite to move towards mouse click smothly?

how do i get this code to make it so that it stops moving on mouse position when clicked

public Transform firePoint;
public GameObject player;
public float bulletForce = 20f;

// Update is called once per frame
void Update()
{
    if (Input.GetButtonDown("Fire1"))
    {
        dash1();
    }
}

void dash1()
{
    Rigidbody2D rb = player.GetComponent<Rigidbody2D>();
    rb.AddForce(firePoint.up * bulletForce, ForceMode2D.Impulse);
}

}

First when you click you need to transform the screen space coordinates of your mouse click to the world space location.
This is then your targetposition.

Because this is going to be an animation like behaviour which must be updated each frame you need to put movetowards either in a coroutine or in update maybe guarded by a bool “isMoving”.

MoveTowards returns a vector you have to assign the returned value.
for example

transform.position = Vector2.MoveTowards(transform.position, mouseclickPos, stepsize);

You could make stepsize a constant value multiplied by deltatime.

So your update will look like (pseudocode)

...
var targetpos;
...
void Update()
{
if(click)
  {
    targetpos = mousepos to worldspace;
    isMoving = true;
  }

  if(isMoving)
  {
    transform.position = Vector2.MoveTowards(transform.position, targetpos, step);
    check if you reached the target pos if you did then isMoving = false
  }
}