That's a little unfair.
Every element can be sourced for free. And sometimes can be obtained with little time necessary.
Many municipalities will give free compost occasionally(like in spring!) You just have to drive there and often bag it yourself. So compost for the cost of just the bags or truck bed... I mean come on... But muh time! Some even have a limited number of free bags. Some have loaders for trailers. Ymmv!
Many places have seed giveaways. Many places have people/orgs that put out free plants(similar to free/little libraries). If you know someone with plants ask for a cutting, they'll probably be happy to provide. Water often works alone but there's root stimulant that's not expensive.
You can do all kinds of home made containers. Coffee cans or milk jugs. 5 gal buckets with holes drilled in the bottle (not too many!) handle is great for tomatoes! You could literally use a plastic shopping bag. Or the ground. Or hydro - some hydro can be just as cheap as soil, but probably better results.
To cut down on soil expense, if you buy, there's various filler materials you may want to consider. One of my favorites is sticks and leaves and needles and mulch(free). They break down over time providing nutrients.
If you see your neighbor having their trees chopped down go ask them for the mulch or wood chippings.
There's even vertical farming. Space smace!
Even your piss and shit can be used as fertilizer and compost. Now we getting real.
There's just so many free inputs. Growing plants is fun. If it costs you time, then reap what you sow, and if you do a good job you will have positive return on investment.
Grow some plants my friend.