grid-auto-flow: row;

The auto-placement algorithm places items by filling each row in turn

item1
item2
item3
item4
item5
item6

grid-auto-flow: column;

The auto-placement algorithm places items by filling each column in turn

item1
item2
item3
item4
item5
item6