My AI Car goes to a cube then it starts to go around it any help?

I am Making a Racing Game but the AI(The Car) goes to the cube and then goes around in circles as well.Here is my Script.PS if you give me another script keep it in C# Thanks.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class DreamCar01Track : MonoBehaviour {

public GameObject TheMarker;
public GameObject Mark01;
public GameObject Mark02;
public GameObject Mark03;
public GameObject Mark04;
public GameObject Mark05;
public GameObject Mark06;

public GameObject Mark07;

public GameObject Mark08;
public int MarkTracker;

void Update () {
	if (MarkTracker == 0) {
		TheMarker.transform.position = Mark01.transform.position;
	}
	if (MarkTracker == 1) {
		TheMarker.transform.position = Mark02.transform.position;
	}
	if (MarkTracker == 2) {
		TheMarker.transform.position = Mark03.transform.position;
	}
	if (MarkTracker == 3) {
		TheMarker.transform.position = Mark04.transform.position;
	}
	if (MarkTracker == 4) {
	TheMarker.transform.position = Mark05.transform.position;
	}
	if (MarkTracker == 5) {
		TheMarker.transform.position = Mark06.transform.position;
	}
	if (MarkTracker == 6) {
		TheMarker.transform.position = Mark07.transform.position;
	}
	if (MarkTracker == 7) {
		TheMarker.transform.position = Mark08.transform.position;
	}
	
}

IEnumerator OnTriggerEnter(Collider collision) {
	if (collision.gameObject.tag == "Dreamcar01") {
		this.GetComponent<BoxCollider> ().enabled = false;
		MarkTracker += 1;
		if (MarkTracker == 8) {
			MarkTracker = 0;
		}
		yield return new WaitForSeconds (1);
		this.GetComponent<BoxCollider> ().enabled = true;
	}
}

}

I am assuming you’re using the NavMesh AI, or another form of mover, as the code examples you’ve listed show no form of movement.

If so, adjust your angular speed.

This circling behavior happens when your unit is approaching it’s target from a weird angle, but it can’t turn fast enough (hence, increasing your angular speed), which will allow it to turn sharper while still maintaining it’s speed.

If this behavior looks odd, and since you’re using a car, i suggest you do some fancy distance checking, and slow the car down as it gets so close to the target.