In brief
grid-auto-flow controls automatic placement of grid items. Adding dense allows earlier gaps to be filled when a later item fits.
Useful to know
grid-auto-flow controls automatic placement of grid items. Adding dense allows earlier gaps to be filled when a later item fits. [1]
This can make the layout more compact while changing visible sequence relative to source order. For steps, rankings and interactive cards, check reading order rather than judging only the absence of gaps.
Sources
For further detail and to check the information: