Hmm. Not sure why you would choose to get an injection rather than eating fortified foods or taking a supplement. You really should not be getting these injections without the guidance of a doctor.
No medical procedure is without risk, and the intramuscular injection that is used for B12 has a risk of muscle pain, nerve injury depending on the placement of the injection, and a small (but not zero) risk of infection. Taking supplements or eating fortified foods is zero risk.