One thing I do to avoid that onion issue is I often prep a bunch of them and freeze them. I’ve got at least a pound of plain yellows rolled up in a cylindrical “chub” in my freezer right now,
I do the same for other onions, garlic, and things like parsley, peppers and celery, too. Often, I’ll take a few hours and do a whole bunch of veg chopping to get it out of the way all at once.
Not only does it minimize your losses to spoilage, it also cuts the amount of cleaning you have to do, AND it can cut your meal prep time immensely,