How do I move a 3d object from point a to b with a random timer?

I am trying to move an object from point a to point b (Same speed same position) but with a random timer between each move. I haven’t been able to find anything about this specific scenario. I am completely new to coding also, so I can’t piece odds and ends together, Please Help!


   class MyClass: MonoBehaviour
        [SerializeField]private Vector3 _pointBVector3;
        private void Start()
            var pointAVector3 = this.transform.position;
        /// <summary>
        /// MoveObject
        /// </summary>
        /// <param name="_transform">Pass transform Which You Want To Move</param>
        /// <param name="initialPos">Start Position Of Move Object</param>
        /// <param name="endPos">PointB </param>
        /// <param name="time">Random Time Like Random.Range(2f,5f)</param>
        /// <returns></returns>
        private IEnumerator MoveObject(Transform _transform,Vector3 initialPos,Vector3 endPos,float time)
            var i = 0.0f;
            float rate = 1.0f / time;
            while (i < 1.0f)
                i += Time.deltaTime * rate;
                _transform.position = Vector3.Lerp(a: initialPos, b: endPos, t: i);
                yield return null;