How to add an Instantiated GameObject to a List in a List

When I instantiate a GameObject and want to add it to a List in a List and later check the List in the List if there are any GameObjects it says 0.

Instantiation

    public async Task Prepare()
    {
        int currentSeed;
        for (int i = 0; i < manager.pit.Length; i++)
        {
            currentSeed = 0;
            for (int j = 0; j < manager.pit[i]; j++)
            {
                GameObject addme;
                await Task.Delay(10);
                Vector3 point = spawnPoint[i].transform.position;
                point.y = point.y + 0.04f;
                Quaternion rotation = spawnPoint[j].transform.rotation;
                addme = (GameObject)Instantiate(seed, point, rotation);
                seeds[i].Add(addme);
                currentSeed++;
            }
        }
    }

Debug

    public IEnumerator MoveSeed(int pit, Vector3[] targetPos)
    {
        for (int i = 0; i < seeds[pit].Count; i++)
        {
            GameObject send = seeds[pit][i];
            yield return new WaitForSeconds(2);
            Debug.Log($"{seeds[pit].Count}");    //Here it says 0
            SeedMover(send, targetPos[i]);
        }
    }

I thought that maybe it’s because of the public async Task.

First, it’s unclear how the coroutine runs in relation to your Prepare() task. It’s best not to mix and match different way of timings, here Task.Delay (which won’t work on WebGL I believe) and WaitForSeconds (which depends on the Update rate).

If the goal is the delay, use a coroutine for instantiating objects and in order to instantiate objects faster than one per frame simply instantiate multiple per coroutine yield.