I feel like I can't have kids.

Ho
I am 27 and I have been having unprotected sex for years now with my boyfriend and we broke up recently and he got a girl pregnant just lik that. I honestly believe I just can't have kids. Don't get me wrong I am glad it didn't happen with him but I can't shake this feeling I won't ever be able to have kids. My question is what do you do to figure out if your able to or not? What kind of test do they run? And what are some options they can give you if you can't.