Treatment of vitamin B12 deficiency will depend on the cause.
If you can't get enough vitamin B12 from your diet, a healthcare provider, such as a dietitian, can advise you on how to include more vitamin B12-containing foods. People following a vegan diet will need to increase intake of foods that have had B12 added including breakfast cereals, plant-based milk, nutritional yeast or yeast spreads, (eg, Marmite) and may need to take a vitamin B12 supplement.
If the deficiency is due to poor absorption from your gut, or pernicious anaemia, your healthcare provider may prescribe hydroxocobalamin, which is given as an injection into your buttock muscle. Read more about vitamin B12 supplements.