Can this affect me getting pregnant??

Can having an eating disorder affect your body getting pregnant? I’ve struggled for a while with this problem and over the past couple months my fiancé and I have been trying and I thought I was last month because I was 2 months late but got my period. What should I do?