Different problems, 1D vs 2D. There's some overlap, but they attack the problem from different directions. Flex child elements determine their own size, while the parent grid determines the size of the child grid elements.
There’s a lot of overlap between the two, but there are also various problems that one can solve that the other can’t. Grid is 2D with limited 1D-like auto placement, whereas Flex is 1D with limited 2D-like wrapping.