two years

Debra
Hello! So I am 18, and today I got my period for the first time in a while. Like, two years. I was told by every doctor that I went to that I just had low iron levels. However, I recently discovered that I had a yeast infection. So, I tried an essential oil fix for it, and the yeast infection cleared up. Apparently it was a very bad one that went a long time without being diagnosed. Could this have affected my period?