CSS Grid vs Flexbox: Which One Should You Use to Center a Div?

Flexbox is best for component-level centering, Grid for page layouts and two-axis control. Both are valid — they just run different layout algorithms.