I tried making sourdough without a starter culture several times and it worked every time (1), so I suspect that having the correct conditions may be sufficient depending on what you want to ferment.
(1) to be precise, it looked and tasted the same every time, and it was somewhat sour and not disgusting, so I just assumed that it worked ;)
Sourdough does use yeast from the air and feeds on the flour (often with help from a sugary friend like an apple), but fermentation of vegetables is usually from bacteria on the skin of the veg, for instance in sauerkraut the bacteria that kicks off fermentation is Leuconostoc mesenteroides which is found on the skin of cabbage (and many other veg).
With both you can use a starter, often from the previous batch but buying them works too. My first attempts at sourdough weren't very successful at all and I wish I'd chosen a famous starter to get that good taste, even once I got it going okay it wasn't a great taste, the yeast strains in my kitchen can't have been that good!
(1) to be precise, it looked and tasted the same every time, and it was somewhat sour and not disgusting, so I just assumed that it worked ;)