Need advice

So I had a miscarriage in June and in July. I was wondering if my doctor can do something for me to carry full term. Has anyone gotten any medications or something? I’m trying again and just want to be safe.