Where did brewers and bakers in earlier times obtain yeast?

by Jc40k

Many things I've read about history of baking and brewing mention peoples using yeast for various purposes. I'm curious however pre-modern era how yeast is obtained in the first place. Is it a by product of another cooking process? Is it found naturally in some places and used for food and brewing? Did communities keep small supplies of it or grow it? Did they know of the many different kinds of yeast?

Qweniden

There are many species of yeast that can cause alcoholic fermentation but the hardiest and most widespread is saccharomyces cerevisiae. It likely entered into the human ecosystem via grapes made into wine. Analysis of early alcoholic beverages shows that were often honey/grain/grape mixtures so the grapes were probably the vector for the yeast. Once a yeast colony resides in a group of humans though fermentation can start spontaneously but to insure a quick and strong fermentation they would skim of the foam from fermentation as save that as the starter for the next batch. Before our modern era they would keep a batch of sourdough starter going indefinitely for bread baking but the yeast in it probably came from breweries.

Brettanomyces yeast will also cause fermentation but it rarely exists in isolation without saccharomyces cerevisiae.

Its worth noting that they didn't know about "yeast" as an organism but they knew that residue from previous fermentations would start a subsequent one.