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,
Depending on your knife skills, you could possibly use a food processor to cut up onions in bulk this way. I bought two red bell peppers yesterday, and the second recipe is for early next week; I might cut up the second when I'm doing prep today and freeze it. Depends on how much room we have in our little freezer, of course. We've been meaning to buy a chest freezer since we moved into this house almost a year ago, but this is not a good time to try to find such a thing, let alone buy one. With just the two of us, we can get a lot of food into the freezer built into our fridge, though; I think we'll be fine.