Teeth

What causes messed up teeth?? Is it genetic?? Over bite or under bite or crowding, gaps.. ???! My parents have good teeth but my sis and I had pretty messed up teeth. Of course we ended up getting all kind of extractions plus braces.. very expensive. I don’t have kids yet but I always wonder what can I do to make sure when I do have kids, their teeth aren’t messed up like mine.