advice please!! I am frustrated

I have been ttc for years and have always had normal periods but the last two month I have very long periods in april it was 21 days and in may till today I have been on it for 26 days the er dr gave me provera and I dont quite understand what it does besides stops the bleeding. i just wanted to know if this will make it even harder to get pregnant from taking it idk i guess i am just stressing myself and worrying any advice would me nice