Advantages of cooking vegetables before or after freezing them I'm putting all vegetables in the same bag in the hopes that a general rule of thumb can answer many individual vegetable questions, but if at the end it depends on the vegetable, please answer what criterion you would use to decide wich order to use.

Suppose I have vegetables such as pumpkin, and I want to eat it in a month, suppose it will get bad if unfrozen. I want to eat cooked pumpkin someday. Should i cook today and freeze or freeze now and cook someday?

I want to know if cooking a vegetable before freezing it provides advantages or differences with respect to the other order, from a food preservation and vegetable eating quality standpoint, or from a flavor viewpoint. (See this accepted answer's cited block) for a example of cooking before freezing.
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).