9 weeks and getting nervous

So this is my very first pregnancy!! Super exciting! But also a little nerve wracking because my mom and sister both miscarried their first times. I know not all pregnancies are a like but if I have a similar uterus to anybody it would probably be them. So this entire time I've been thinking good thoughts, but also not trying to get my hopes up, just incase this does fail.

My mom doesn't remember when or how her first miscarriage happened. My sister always said when she got the first sonogram there was no heartbeat. I was super scared for my first appointment for that reason. The night before my appointment my sister opened and told me she had no clue she was pregnant, that she was still smoking and drinking, and when she went to urgent care they told her she was pregnant but that her labs didn't look good, and she went directly to the ob/gyn. That's when she got a sonogram and was told that baby wasn't alive.

The next day I went to my appointment and everything went GREAT. Found the heartbeat, baby looks good, it's growing accurately, all good news. Now I'm wondering if me planning this pregnancy, not being a smoker, and taking prenatals is what makes the difference between my pregnancy and theirs? They were both smokers and my sister was actually drinking during her unknown pregnancy. I have less than 3 weeks until I'm out of my first trimester and the chance of miscarrying decreases.

I guess I want opinions on if you think i could miscarry for the sole fact that they did, or if you think my circumstances give me an advantage and a shot at this. Also, I know it's common to miscarry usually until 12 weeks, but is the baby having a good heart rate, growth, and overall good labs at 9 weeks a good sign they will make it? Or has anyone here miscarried after an appointment regardless of how great it went?

I know this can be a touchy subject asking women to relive their miscarriages but knowing it might just be something in my genes that may cause one just freaks me out and I really need some first hand advice.