Frozen is probably the best choice unless you can get it fresh from a farmers market. Store vegetables probably have been on the shelves for weeks before purchased. Frozen are flash frozen at the peak of freshness/ripeness for maximum taste and nutritional content. Farmers markets were usually picked the day before if not the same day you buy it. In the end choosing any of these methods is better than not choosing veggies at all.
I used to stock up on frozen but had to get rid of my second freezer when I moved. Now I am stuck buying a little, not much, but a little more canned veggies. I found some NO salt veggies when I was at the grocery store and they were actually tasty.
Now for fruit, be very very careful even when selecting frozen. They usually have added sugar in them unless it specifies on the back it is only that fruit or berry.
Almost anything not high in acid can be canned very easy at home too, but is more of a pain. I have done this but would rather just open a pack of frozen. High acid items like tomato sauce needs to be canned using a pressure cooker to kill the potential harm of botulism.
I guess I should add the living in Central valley of CA allows me to eat some of the best fruits and veggies. We have many local places to buy from. I am spoiled when it comes to this aspect.