Livestock is given B12 supplements. B12 only occurs naturally in soil, where the concentrations are too low for even animals to bind. Prehistoric humans probably ate more dirt and had enough of it.
Sure, here you go: eating cobalt from the soil wouldn't give you B12, because bacterial fermentation in humans is occurring in the colon, while B12 is absorbed by the ileum.
But actually there's a solution for vegans. As the following paper in Nature eloquently puts it:
"Human faeces contain appreciable quantities of vitamin B12 or vitamin B12-like material presumably produced by bacteria in the colon, but this is unavailable to the non-coprophagic individual."
LOL. Patently false. B12 is produced by bacteria in herbivores' guts.