The shelf life will generally say how long it can be kept at what temperature. At the same time, for ventilation, whether it is placed in a relatively backlit and cool place is sometimes required.
What you said about Pleurotus ostreatus should probably be kept in the wrong way, or put in the wrong place, so it has an odor.
There is another kind, because Pleurotus ostreatus is originally grown in salt water, so it will have the smell of sea salt, which is also a kind of seafood. Seafood will smell after being kept for a long time, because it begins to oxidize. The whole is beginning to break down.
Of course, it is also possible that this is the normal state of Pleurotus ostreatus, and it will smell when you buy it, but it will not smell when it is cooked and cooked. I just didn't pay attention to this problem when I bought it back.