Two esp32 in the same box

I have two esp32 in the same box powered by the same power supply.

The problem is sometimes when I power up the circuit only one will connect and other times neither will connect to the WiFi router.

I am thinking they both try to connect to WiFi at the exact time and collided with each other. When this happens I need to reset the failed board.

My question is, where in the code can I add a delay to the startup on one of the systems to verify my theory?

The platformIO IDE is foreign to me so I may need some additional help for a old timer.

Thank you