If we examine the archeological evidence of all the earliest human production of alcoholic beverages, the ingredients transcend our modern definitions. Instead of there being "beer", "wine" and "mead" we find that they almost uniformly used grapes, grains, honey, various herbs and often tree resins. The primary vector of fermentation yeast would initially be the grapes. Once a colony of saccharomyces cerevisiae yeast get a foothold in a human settlement it because essentially a domesticated species. While not airborne, it lives on and in humans themselves, sourdough bread starters, furniture, fermentation containers, utensils, etc.
By the middle ages, brewers would specifically save the "foam" from on brewing batch to inoculate the next. Similar to how bakers maintain sourdough starter.
hi! not discouraging other responses, but here's a recent post with a reply by resident alcohol historian /u/qweniden