Rh- miscarriage?


Hello everyone πŸ‘‹ so last year i got pregnant for the first time i was 4 weeks along by the time i found it was a huge shock out, after i went through blood tests i come to find out i am rh- and was given the rogham shot around 6 weeks, i ended up miscarrying at 8 weeks and the doctor gave me the usual reasons for miscarriages (i don't smoke drink or do drugs) or she thought it could have to do with my blood type and i didn't get the rogham on time, i ended up pregnant again within 2 months and ended up having my rainbow baby😍🌈 anyways my question is if i want to have another baby do i need the rogham before i get pregnant or will i lose another baby if i don't? Oh also my bf didn't know his blood type either and with my new pregnancy he got his blood drawn he is ab+ (actually i had an m antigen in my blood during my pregnancy from my bf somehow that the doctors were very interested in) and our son was born rh+