Let’s talk about bugs. You may like them personally under some circumstances (which I cannot imagine) but you don’t want them in the kitchen, eating your food.
When I grew up in Florida, I went to an un-air-conditioned high school with direct access to the outside world. The school had problems with palmetto bugs and cockroaches. When we put our lunches in our lockers, the bugs frequently got our lunch before lunchtime. We got used to carrying our lunches with us all morning; I developed a taste for squashed peanut butter and jelly sandwiches by default because my sandwiches always looked like they were run through an old-fashioned ringer washer by lunchtime. Please note that we could also stop here and talk about the rats in the locker rooms, but I digress!
Sealed containers are great for storing cookies, pretzels, and cereal. They are not expensive and can be purchased at the grocery store. If your significant other never had them, please buy some and transfer your food into them. If your dearly beloved had them but the food has been in there for an extended period of time, dump the food and start over. You may be growing penicillin, otherwise.
Here’s a quick bit of information: if you like soft cookies, put a piece of bread in the Tupperware-type container when you add cookies and they will remain soft longer. The bread will become hard as a rock, so you will need to toss it out and replace it occasionally, but the cookies will be delightful.