Moving GameObject to a location at a random speed help

I’m currently working on a 2D project and I have a scene where I generate a random point within the bounds of the screen and move a game object to that point at a speed(soon to make the speed random). I have it repeat once the game object hits the point to generate another random point and move to it. But the second point the game object typically flies off almost on a tangent to its path and the next path. Any help?

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class TrackingBall : MonoBehaviour
{
    Vector2 topright = new Vector2(1, 1);
    Vector2 bounds;
    Vector2 nextPos;

    public float speed;
    public GameObject collider;

    void Start()
    {
        bounds = Camera.main.ViewportToWorldPoint(topright);
        ChangeDirection();
    }

    void OnTriggerEnter2D(Collider2D coll) {
        if (coll.transform.tag == "Collider"){
            ChangeDirection();
        }
    }

    public void ChangeDirection() {
        nextPos = new Vector2(Random.Range(-bounds.x + 1.5f, bounds.x - 1.5f), Random.Range(-bounds.y + 1.5f, bounds.y - 1.5f));
        collider.transform.position = nextPos;
        Debug.DrawLine(gameObject.transform.position, nextPos, Color.red, 10f);
        GetComponent<Rigidbody2D>().velocity = (Vector2)gameObject.transform.position + nextPos * speed;
        Debug.DrawLine(gameObject.transform.position, (Vector2)gameObject.transform.position + nextPos * speed, Color.green, 10f);
    }
}

Line 30 you are setting the velocity to a value dependent on your world position, PLUS adding speed multiplied by the world position of your destination… The further from the origin the sum of those two values are, the faster you’re going to go.

More likely you want to set the velocity to the DIFFERENCE between your destination and your current position, first normalized, and then multiplied by the desired speed.

It would look something like this:

GetComponent<Rigidbody2D>().velocity = (Vector2)
                ( nextPos - gameObject.transform.position).normalized * speed;

If you are at point A and going to point B, you always put B first when taking the difference, as I did above.