Thyroid and miscarriage

I’ve had 2 miscarriages now. One was a chemical and the last was a missed miscarriage at 12.5 weeks. Of course I have read everything I can find even though I’ll probably never know why. But I did keep seeing that problems with thyroid can be a cause. It got my attention because I have been tested a few times in the past because my mom had a lot of trouble with hyperthyroid. I decided to get tested again and they called today to tell me that my thyroid is borderline low. So I go back in a month to test again and if it’s still low they are going to start me on medicine.

Has anybody else experienced this and had a successful pregnancy after getting on medication for your thyroid problem? This has given me a little bit of hope.