Cooked yellow squash is good for about 7 days when refrigerated.
When you freeze the cooked yellow squash it will last for up to a year before it begins to go bad but when frozen the freezer keeps bacteria from growing on the cooked yellow squash.
To refrigerate the cooked yellow squash put the cooked yellow squash into a Ziploc bag or a food container that is sealed to keep it from going bad.
When kept in a sealed container or plastic Ziploc food bag in the refrigerator the cooked yellow squash will last for up to 7 days.
Cooked squash is best eaten within a few days of refrigerating it though because it loses it's freshness and the texture and taste can change some the longer the cooked squash remains refrigerated.
If the cooked yellow squash has been in the refrigerator longer than 7 days then it likely is bad and should be thrown out.
To keep the cooked yellow squash longer than 7 days make sure to freeze it and then thaw it out when ready to eat or serve it.