Gardening can be so expensive! I have a big fruit orchard and a vegetable/herb garden, I have a well and don't pay for water, and I have my own compost system, and I chop and drop and prune my fruit trees to maintain keep them within reach. I get a free load of wood chips annually that I use for mulch, and it takes me 3 days of backbreaking work to install it all.
I still spend hundreds annually just on soil to top off the vegetable/herb gardens. Then there's fertilizers, pest control, lady bugs to control aphids, mesh bags to cover my grapes and figs so birds don't eat them all (they still get most of my berries). I don't account for mowing and weed whacking as charging them barely makes a dent in my electric bill, but trimmer line and sharpening/replacing blades is another cost. Weed barrier, shade fabric, trellises, I'm sure I'm forgetting a lot of other things.
If you have a couple small raised beds you use for herbs and maybe a small tomato plant, it can be relatively cheap, but the average person will not save on grocery bills by gardening.
The exception is herbs! Don't buy that $7 bunch of mint from the grocery store, just cut a small stem and throw in the bottom of your shopping cart and pretend you don't notice it, when you get home throw it in a water cup and give it a few days to root, move it to soil and now you have free mint for life. Same with most herbs. Save your green onion bottoms and do the same with those, don't but a bunch every time you need a few leaves.
But that's not much of a hobby on its own, as soon as you start gardening for a hobby, it starts getting expensive.