Yes and no.
If you are vegetarian and drink little or no milk, yes.
If you are vegan: definitely, yes.
Lacto-ovo-vegetarians may very well meet their vitamin B12 needs with dairy and eggs. Only by drinking 500 ml of 3.25% milk or eating two eggs and 250 ml of 3.25% milk per day, they can meet their needs for this vitamin.
On the other hand, for vegans, the task is more complicated. By consuming fortified foods (soy milk, nutritional yeast, imitation meats or even modified plants fortified with vitamin B12), they will be able to get a good amount of vitamin B12 in their diet.
For vegan pregnant women, it is highly recommended to take a daily supplement of vitamin B12 that covers the needs of 2.6 mcg per day.
A lack of vitamin B12 can cause anemia, memory problems and other permanent neurological problems. A lack of vitamin B12 can be masked by the presence of a large quantity of folic acid in the diet. Deficiency symptoms may only appear after a long period of time, therefore it is better not to wait for their appearance, but to prevent it!