Error to find Objects in Unity using an array

I am new to Unity programming.
I’m trying to make a for loop collect 100 images in the void Start. But the script doesn’t work.
The images are imported as sprites and have a tag called “puntosVerdes” I also added a script called the same “puntosVerdes”. But I can’t find them even with the search by Tags or by “FindObjectOfType”. Could someone give me a hand, thank you very much.

public GameObject[] imagenesPuntosVerdes;
public GameObject imagenContenedor;
int cantidadImagenesSecuencia;
private const string Tag = "puntosVerdes";

void Start()
    {
        cantidadImagenesSecuencia = 100;
        imagenesPuntosVerdes = new GameObject[cantidadImagenesSecuencia];
        for (int i = 0; i < cantidadImagenesSecuencia; i++)
        {
            Debug.Log("Cantidad puntos verdes");
         //el bucle funciona, pero no me encuentra las imagenes.
         imagenesPuntosVerdes[i] = FindObjectOfType<puntosVerdes>().gameObject;  
           
        }
    }

FindObjectOfType will return the first object found, pretty much the same one every time. You want FindObjectsOfType, the plural version.

It’s also pretty slow, I personally would rather just have the scripts add themselves to a List.

Hello RadRedPanda and thank you very much for answering, your solution creates another problem for me that I will now try to solve. I have tried many ways. I would like to know the solution you are talking about. Thanks a lot!

The documentation says it returns a List of whatever you’re trying to get. Just iterate over the List.