Your brain needs vitamin B12 to function, but your body can’t produce B12. Research shows that not getting enough B12 through diet or supplementation can lead to cognitive difficulties, including problems with thinking, reasoning and remembering.