B12 comes from bacteria on the ground. If you eat dirty food you should get some.
I just have a B12 supliment I take.
I'm not sure where to get the active bacteria, but you could culture some nutritional yeast, or buy some inactive yeast from the store.