Weird question

I’m wondering if it’s safe to drink like sprite/seven up or Mountain Dew during early pregnancy. I’ve read that caffeine could cause early miscarriages (I just had a chemical and I blame myself because I drank a lot of coffee before I even knew I was pregnant). So just wanting to make sure it’s safe to drink that. I love Pepsi but I think it has a too high dosage of caffeine.