has anyone had two early miscarriages and ended with a successful pregnancy?

I am 26 and healthy the only pills I take are vitamin D supplements due to moderate vitamin D deficiency and I just can’t understand why I just had my second early miscarriage. First one I had in late oct 2017 I was about 5weeks and this one in late May 2018 about the same 5 weeks. Ive never even seen the gestational sac on either one 😢. I don’t feel optimistic anymore and am really starting to think something is wrong .. has anyone had two early miscarriages and ended with a successful pregnancy? And if so what did you do differently 3rd time around ?