B12 deficiency is also known as Pernicious Anaemia. B12 deficiency and Pernicious Anaemia are one and the same thing. Patients are rarely anaemic as such but the symptoms come from the low levels of B12. This condition is either caused by auto-immune disease where auto-antibodies interfere with Intrinsic factor in the stomach (around 50% of patients) or poor absorption of B12 from the stomach due to a number of problems with the stomach like low or high acid or intestine/bowel conditions (the other 50%).
Autoimmune Diseases occur when the body produces something that harms itself. There are many types of autoimmune diseases including Type 1 Diabetes, Lupus, Systemic Sclerosis, Rheumatoid Arthritis, Hashimoto’s Thyroiditis and others.
People who have Pernicious Anaemia are unable to absorb Vitamin B12 from food or do not eat a diet with enough B12 in it (B12 is in eggs, meat etc). Once the Vitamin B12 Deficiency is corrected patients can live a more or less normal life. However, a great many people still have problems with symptoms after the deficiency has been corrected and may people will need replacement therapy with B12 for the rest of their life.
You can read more about Pernicious Anaemia here: https://pernicious-anaemia-society.org/pernicious-anaemia/
Treatment of B12 deficiency consists of B12 injections every two days along with folic acid supplements until symptoms stop improving. after that, maintenance will consist of injections every fortnight or month.