Wandering Enemy in unity

Im making a top down shooter in unity. The enemy ai travels straight to the middle before actually wandering when I put in the code. What should I do to fix that? I copy the code in this video:https://www.youtube.com/watch?v=FdNervYWmcE

using System.Collections.Generic; using UnityEngine;  public class EnemyWander : MonoBehaviour {     [SerializeField]     float speed;     [SerializeField]     float range;     [SerializeField]     float maxDis;     Vector2 Waypoint;     // Start is called before the first frame update     void Start()     {         setNewDes();     }      // Update is called once per frame     void Update()     {         transform.position = Vector2.MoveTowards(transform.position, Waypoint, speed * Time.deltaTime);         if(Vector2.Distance(transform.position,Waypoint) < range)         {             setNewDes();         }     }     void setNewDes()     {         Waypoint = new Vector2(Random.Range(-maxDis, maxDis), Random.Range(-maxDis, maxDis));     } }