The answer is, it all depends—on the type of produce, the type of processing, and which nutrients.
In general, fresh produce picked at peak maturity offers the highest amount of vitamins and minerals and tastes the best, but soon after harvest these nutrients degrade.
It can take 1-2 weeks for produce to be transported from farms to supermarkets and then purchased by the consumer. Several more days may pass before you actually eat it.
Part of the nutrient losses occur with moisture loss if water-rich produce sits at room temperature.
Estimates show that at room temperature, fresh peas lose about 50% of vitamin C in one week, and fresh spinach can lose 100% of the vitamin in less than 4 days. (1)
Refrigeration can slow degradation, but even so, certain highly perishable fruits like berries only last about a week before visible changes in color, texture, and flavor set in.
Apples, pears, and squashes are less sensitive and can last for 1-2 months with refrigeration.
For longer storage, canning and freezing can preserve nutrients more effectively than refrigeration. Initially some nutrients are lost during processing.
For example, canning uses heat treatment or other methods to destroy bacteria, followed by storage in a liquid medium in an airtight container; freezing entails a prior step of blanching the produce quickly to deactivate enzymes that speed ripening.
In both cases, some water-soluble vitamins like C and B may be destroyed or leached into the cooking or storage liquid.
Asparagus loses about 30% of vitamin C during canning but only 10% after blanching and freezing. Generally, the freezing process averages about 50% loss of vitamin C (range 10-90%), and canning treatment causes average losses greater than 60% (range 8-90%).
The ranges are wide depending on the exact processing treatment, storage conditions, and type of produce.
But regardless of losses during processing, some or many of the nutrients are retained, which upon storage are further preserved through protection from oxygen, heat, and light. Broccoli retains almost 100% of vitamin C after freezing.
Home cooking of fresh or processed produce will cause additional losses due to nutrients destroyed by heat or seeping into the cooking water.
Microwave cooking and steaming as opposed to boiling and deep-frying preserves the most nutrients due to quicker cooking times and reduced contact with water.