IDK about other people, but I find, for myself, the sweet spot is somewhere in an inarticulatable multidimensional object of grocery store cost vs quality vs nutrition vs effort vs storage vs health
I don't grow wheat or rice because they're low cost (pro buying), there are very high quality options available that aren't any worse than what I could do if I was working my very hardest (pro buying), is pretty low nutrition wise anyway but if you get the high quality stuff again isn't any worse than what I could do if I was trying my very hardest (so, pro buying again), it's very easy to industrialize but pretty hard to grow small scale and process -> so high effort for me (so, pro buying again), and lastly if I'm buying unground grains those fuckers last 25+ years, so buy a mill and move on with my life. Also not particularly high in like, fiber or whatever.
So buy, pretty much always.
A middle example would be zucchini, which are high cost (pro growing), the quality at a nice grocery store is about what I can achieve myself (neutral), I *can* achieve 1-2x better nutrition because of degradation time after picking + heirloom varieties + my own compost and soil but it's a starchy fast growing veg so (soft pro growing), medium effort (have to get starts, stay on top of watering, trellis) so soft pro buying especially if i'm busy, are extremely seasonal (2 months out of the year max and unless I'm using them shredded frozen in zucchini bread do not store well) so gorge on them seasonally and don't use them the rest of the year or buy them infrequently out of season, and lastly they're pretty good because they're a veggie, good for fiber and hydration, and pair well with other things that are healthy for you.
So grow 1-2 plants, binge on them when they're in season, but don't flex particularly hard on trying to preserve or store them year round. Eat zucchini-focused dishes in season, but if I need like one to round out something in January I'm not going to kick myself for not eating something in season, I'd rather eat healthy.
A complete counter example would be fruit jam, where the grade of stuff I like eating is: insanely expensive (10+$ cup store vs less than 3$ cup homemade, less if foraged grown or upick berries so homemade always), better than any jam I've ever had in a store (have won contests), nutrition (I pick at peak ripeness and even though shelf jam loses a lot of its vitamins I can confidently say these are higher mineral, ), high effort but I only have to do it for 3-4 days every other year to produce several hundred jars, holds up great in storage, and I make extremely low sugar no filler varieties, so it's going to be better for you to eat in bulk (especially for your teeth) than storebought.
So basically always use homemade jam, in my household, but I also have access to only slightly sub-commercial grade processing equipment and commercial grade cleaning and processing locations so that ratio works for me. I also trade the things I make with a lot of my friends, so when they support me they get the benefit as well.
I use a lot of local farmers markets, buy bulk and process when I can from farmers to keep the footprint smaller (own sunddried tomatoes for example) and even though I don't raise my own chickens I use the bones for stock, eat almost all the organs and what I don't use I dehydrate and compost, and eat all the meat.
I also process food professionally, and have grown it professionally though I don't currently, so I will be the first person to tell you that this work is actually very complicated, physically exhausting, and sometimes goes very wrong very quickly.
Anything you do to localize your impact, increase your skills, and fuck over capitalism without starving to death is a-okay in my book.