Growing veggies is one thing, utilizing them well is quite another. The best way of course is to eat them the moment they are picked, but that is not always practical, especially because you wouldn't have anything to eat during the winter months.
This is another challenge to learn when it comes to gardening, how to use the produce you grow. One of the reasons the stuff that comes in a box from the store isn't good for you is because of the preservatives. These preservatives give the food a shelf life so that it will not go bad right away. We just threw in our compost bin 3 formerly nice squash, 2 from our own garden last year and one from the local farmers market. This waste is a lesson caused by the poor storage and not using them up before they started molding and oozing. We had hung them up in hanging baskets (to allow for air flow) in our unheated garage. The reason for the quick demise was freezing and thawing which accelerated their spoilage.
Ideally they would need to be stored in a controlled climate with constant temperature and humidity. A root cellar of sorts is recommended. We wanted them to be cooler than our basement but they would probably have faired better if left in the basement than in the garage. I just looked up the recommend storage temp for winter squash which is 50F-55F. The suggested length of storage is 2 to 6 months. The relative humidity varied between the two sources I checked. One was 50 to 60%, the other 75 to 80%. This year if we save some again we will need to try something else.