activate Child objects in order

i want to activate child objects in an order at 2 seconds gap. i have tried this code but didnt work.
Thank You

void Update()
    {
        if (Input.GetKeyDown(KeyCode.A))
        {
            for (int a = 0; a < transform.childCount; a++)
            {
                transform.GetChild(a).gameObject.SetActive(true);
                StartCoroutine(waiter());
            }
        }
    }

    IEnumerator waiter()
    {
        yield return new WaitForSeconds(2);
    }

this code will call the IEnumerator for no reason, the for loop will continue with no time gap. here’s what you should do:

void Update()
     {
         if (Input.GetKeyDown(KeyCode.A))
         {
             StartCoroutine(waiter(0));
         }
     }
 
     IEnumerator waiter(int a)
     {
         if(a<transform.childCount){
                 transform.GetChild(a).gameObject.SetActive(true);
                 yield return new WaitForSeconds(2);
                 StartCoroutine(waiter(a+1));
             }
         
     }

this way, it will wait 2 seconds before looping