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.