Advantages of cooking vegetables before or after freezing them
Some vegetables will need to be blanched (parcooked) for best results before freezing; freezing them raw results in enzymatic decay that affects quality.

Freezing a finished dish has the advantage that you can work with the ingredient as a fresh one, eg you can match cut sizes to the dish and it might stay more firm while cooked. 
Freezing ingredients gives you freedom of what to do with them later, albeit preparing them optimally can be trickier - freeze fine cuts and you can't have large pieces when needed, freeze big pieces and they might freeze slow (affecting quality) and can be difficult to cut smaller (cutting frozen veg is hard, thawing takes time).