breaking up with boyfriend, feel like I wasted my time?

I know he isn't right for me so I broke up with him. I know I did the right thing because I can't bring a baby into the world if I'm not happy but I feel like I just wasted so many years and it'll be forever until I get to have my baby...