oooh OP
It's not marriage that changes things, it's growing up.
What I mean is, I had an awful DH#1, whereas DH#2 is the most awesome human being I've ever met 💗
What made the difference for #2 marriage was not settling for the stuff I thought was OK for #1.
However! the only way to find out and learn is to make mistakes.
I sometimes see couples who have had healthy, happy upbringings, who naturally gravitate towards healthy, happy relationships.
But I think these are rare. For most of us, it's a process of trial, error, and discovery (Who am I?) ... and much of that is put on hold when caring for children.
Eventually, it is possible to muddle through and find our happy place, but only if we have the courage and insight to make terrifying choices based on nothing but gut instinct, when we have no experience of any other reality to reassure us that we're not going mad.
Many people never do this.
Not sure if this makes sense, but that's my tuppeny ha'penny worth 🌞