How does one make yogurt when there isn't any existing yogurt to use as a starter?
There are various bacteria that can make yogurt. They ferment milk at warm temperatures and are called "thermophilic" for that reason.
These bacteria were cultivated by millenia ago. I assume by having milk accidentally spoil to something that didn't kill the starving person who ate it.
Tasty thermophilic lactobacilli do exist in the wild but so do plenty of other very untasty bacteria that would love to eat the lactose in your warm milk. You can't just let warm milk spoil and hope you get yogurt bacteria. The only way to be sure is to not get sick when you eat it.
Getting yogurt starters is very easy.
Any yogurt from the store that contains "live active cultures" can be used as a starter. Yogurt starters can also be purchased dried online.
Once you have some yogurt, and won't be making more for a long time, you can save a little dried or in the freezer.
It is possible to use pepper stems to create a yogurt like product. They place the stems of hot peppers in prepared milk (heated to >70°C) for 12-24 hours at incubation temperature (40-45°C), after which time it solidifies. The stems are discarded and further batches are created with the product.
I myself have tried once with one stem from a sweet red pepper but I didn't dare eat the result and didn't try making further batches beyond the first one. One worry I had was that there is some question as to whether it is bacteria living on the stem or pectins from the pepper stem itself that create the "yogurt."
Sources: (Google has more)
My grandmother used to say that you could make yoghurt the same way that homemade buttermilk is made - add a few drops of lemon to the warmed milk and let it ferment overnight. This would aid the creation of the necessary bacteria for the yoghurt.