Vitamin D and Iron

Last week I had a doctor’s appt because I was starting periods at 4-6dpo and I thought I wasn’t ovulating for a lot of cycles after my miscarriage. (I still think I’m right but doctors are dismissing it because I’m on the younger side 🙃). They took blood and said I’m anemic (levels were at 8 when they want it at 12) and my vitamin D levels are dramatically low (they’re at a 10 when they want them in the 50s). So they prescribed vitamins, both for once a week with food.

But my question is, what does my iron and vitamin D levels have to do with ovulating & lengthening/regulating cycles?