how to instantiate in array consecutive

Transform meatballSlots;
GameObject meatball;

    private void Update()
    {
        foreach (Transform meatballSlot in meatballSlots)
        {
            if (Input.GetKeyDown(KeyCode.Space))
            {
                Instantiate(meatball, meatballSlot);
            }
        }
    }

how can i to instantiate the “meatball” as child of “meatballSlot” consecutive, right now if i press space the “meatball” will instantiate on every “meatbalSlot”, but i need instantiate will consecutive from 0, 1, 2, 3 and then when press each space

I can’t understand exactly what you are saying, but I will assume you mean to instantiate only once meatball per space, and not all at once.
If so, then use:

    Transform[] meatballSlots;
    GameObject meatball;
    int currentMeatball = 0;

    private void Update()
    {

        if (Input.GetKeyDown(KeyCode.Space))
        {
            if (currentMeatball < meatballSlots.Length)
            {
                Instantiate(meatball, meatballSlots[currentMeatball]);
                currentMeatball++;
            }
            else
            {
                // No more meatballs left =(
            }
        }
    }