How to make yogurt without any existing yogurt
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.