list.contains isn`t working

hello everyone, im trying to create a minimap, and for it i need an array that contains all the objects i want in the minimap (in this case the planets). Im using the following code:

foreach(GameObject item in GameObject.FindGameObjectsWithTag("Planet")){
			if (Vector3.Distance(gameObject.transform.position, item.transform.position) < dist &&
			    markers.Contains(item) == false){

markers.Contains(item) == false){
				GameObject go = new GameObject ("Marker_" +;
				go.transform.parent = transform;
				go.transform.localPosition = item.transform.position/dist;

the problem is when i execute the code it adds the items in the sceene every frame. i need it to be dinamic, you know in case an enemy is near. any siggestions are much apreciated, thanks in advanced

Forgot if on line 5:

if( markers.Contains(item) == false){

I would not recommend to do GameObject.FindGameObjectsWithTag(“Planet”) on every frame. But instead keep a manager that holds them, and have the object register to it OnEnable and unregister on OnDisable