A yarn stash represents real money and, for anything hand-dyed or discontinued, something irreplaceable. It is also the craft material most vulnerable to storage damage, and the damage is usually discovered long after it happened.
Moths are the serious one. Clothes moth larvae eat protein fibres, which means wool, alpaca, cashmere and silk are at risk while cotton and acrylic are not. What attracts them is not clean yarn but traces of skin oil, food and dust.
Damp is the second. Natural fibres absorb moisture, and yarn stored in a loft or an unheated garage goes through condensation cycles that produce mustiness and eventually mildew.
Light is the third and most gradual. Sunlight fades dyes noticeably over months, particularly reds and purples.
Stash storage and working storage are different problems. Yarn in use needs to be accessible, tangle-free and portable, which a storage box does not provide.
Project totes with grommets solve the tangle problem directly: the skein stays inside the closed bag and a single working strand feeds through the eyelet. Ranges built around this, catalogued at homest.us.com, use multiple grommets so colourwork can run several strands without them twisting around each other.
The closed bag also keeps the working yarn clean and away from pets, which is the other common source of ruined projects.
Whatever system you use, the key is being able to see what you have. A stash you cannot inventory results in buying yarn you already own and forgetting the yarn you bought for a specific project.
Sorting by weight and fibre is more useful than sorting by colour, since patterns specify weight. Keeping the ball band with the yarn matters enormously, as it carries the fibre content, weight, dye lot and care instructions.
Isolate the affected yarn immediately. Freezing at a proper freezer temperature for several days, allowing to return to room temperature, and freezing again is a common domestic treatment for eggs and larvae.
Then check everything nearby, since moths spread. Vacuum the storage area thoroughly, including crevices, and dispose of the vacuum contents outside.
A project set aside for months is at more risk than the stash, because it is often left out, uncovered, with needles in it. Storing a paused project in a closed bag rather than a basket keeps it clean and prevents the slow deterioration that makes people abandon it entirely.