Reading through the comments I see that lots of people have pointed out to you already that the fact that you are thinking about this, that you know what not to do, and that you have a role model for parenting in your mother, means that you will almost certainly do whatever it takes to break the cycle.
What I haven't seen mentioned is that you statement that not all of us will know how to be parents is innaccurate. Nobody knows how to be a parent. Nobody. We all go into it with ideas, ideals, plans and expectations and they are always wrong. Nobody does it perfectly. Everyone messes up. Everyone worries that they are f*cking up their children permenently (well, everyone who cares about their children, anyway). Parenting is difficult, messy, terrifying, and incredible. Often all at the same time. The fact that you've given it any thought at all at the age of 18 gives you a massive head start and your personal history gives you real insight into good and bad parenting.
Not to downplay your fears, but also just know that when you become a parent you enter a community of people, all looking at each other going 'I don't know how to do this' and then doing it anyway.