Work in grid panel

I’m making spatial inventory. With the possibility to change the number of slots in the future. How to make the slots from the upper left corner to be spawned exclusively down and to the right? So that the panel does not move out.