How can I find a new position once the old one is found?

I want to find a new position once the old one is found and I’m not sure how to check for that.

This is kind of what i’ve thought of so far.

void Start ()
{
    transform.position = new Vector3(0, 2, -4);
}
// Update is called once per frame

void Update ()
{
    //check if position is found here or something.
}

void FindNewPosition() //might need to do an output parameter?
{
    Vector3 newPosition = new Vector3(Random.Range(-5.0F, 5.0F), 2f, Random.Range(-5.0F, 5.0F));
}

}

if( (transform.position - targetPosition).magnitude < 0.01f )
{
// transform is on the target position
// do something with this …
}
else
{
// transform is moving to the target position
// example of move
transform.position = Vector3.MoveTowards(transform.position, targetPosition, Time.deltaTime * speed);
}

Place it in Update.