Just don’t plant cheap stuff.
I will probably never grow onions, potatoes, corn, celery and other vegetables that are always cheap.
I will plant things that are easy and or pricey. Tomatoes for sure, if I bought the tomatoes at the store I would probably have spent $500 just on tomatoes a season. Chives are also easy to manage and expensive in store. Aspargus is stupid expensive and is almost hard to get rid of once established. Some berry type fruits are also worth growing if you have spare land for them since they come back each year.
I have a similar philosophy with basil. It’s cheap enough in our stores, but it’s way more convenient to always know its outside.