Fresh vegetables can stay good too if you buy the right kinds. I've found that asian leafy green vegetables like yu choy or gai lan keep a lot better. The leaves may turn a little yellow but they don't end up a slimy mess in a day. Cabbage is the western equivalent that keeps forever.
In places where the grocery shops are within walking distance and more integrated with your life, you just make groceries more frequently. Consequently, the food you buy is always fresher.
There's so many things linked to poorer outcomes when associated with car dominate design
I recently had a pile of potatoes sitting around for reasons unclear, now I've got several portions of an amazing potato chowder sitting in the freezer, ready to nuke in minutes when I want them. I had a spare onion and carrot lying around so those went in too, worked out great, no planning or recipe required aside from keeping basic cooking staples on hand.
Alternatively most raw vegetables (and fruits!) can be pickled. While you do have to get the proportions roughly correct, making refrigerator pickles is as simple as throwing extra sliced veggies into a jar with water, vinegar and salt (herbs and spices optional to your preference). The acidity keeps them from going bad.
Fruits can be turned into freezer preserves almost as easily. Almost any combination you have lying around can be mashed and cooked down on the stove as much or as little as you want with some sugar, pectin is optional. They'll last for months in the freezer, weeks in the fridge.
People think I'm a cooking genius when they see all this random stuff in my fridge but it's all so easy, the truth is I just don't like waste.
The beauty of canned goods is that you don't expend energy to store them.
The beauty of frozen veggies (and some frozen fruits, blueberries for example) is that they keep and work well for small quantities. I ate a lot of frozen veggies when I was single.
Cabbage, for instance, keeps longer than lettuce. Pluots keep, too, much better than peaches. Oranges, tangerines, and grapes keep well. Carrots keep pretty much forever.