Have a large pantry and only buy supermarket “loss leaders” and use coupons when possible.
Regular “weekly special” prices, even at my most expensive local grocery stores, are cheaper than Sam’s regular prices. Marzetti’s salad dressings for a dollar each, for example. Or, Barilla pasta for 69 cents a box. I stock up on these. One of our stores had Starkist Tuna 2/$1.00. I bought a case. A pantry allows you to leverage these loss leader specials.
As far as bread goes, you are right, you can’t compete on price. A packet of yeast cost half as much or more than a cheap store-bought loaf. You can, however, buy a jar of yeast and keep it in the refrigerator and make a bigger batch of dough and freeze some of it for the future. When I make focaccia, my kids call thier friends to come over. My “kids” are 19 and 22. Their friends have been eating my bread since kindergarten. They wouldn’t scurry over here for Wonderbread.
I also have a small suburban garden. Letuces are in right now. My spring salad mix of baby greens would cost $9.99 a pound. The whole package of seed was $1.29 and over the next 2 months, I will have so much , I will be sick. By then, however, my grape tomatoes will be in, and then the regular ones. No matter how much you spend, you cannot buy tomatoes like mine in the store. I also grow most of the fresh herbs we eat (including the rosemary for the focaccia).