Be with someone with whom you're compatible. Or, in less formal English, be with someone you're compatible with.
Simple, but sadly, if you observe how most romantic couples interact, you'll discover that understanding compatibility is still a secret.
Be with someone who understands you, and give them the gift of understanding. Be with someone you already like, not a "fixer-upper project". Be with someone who shares your "non-negotiable" beliefs and values. Be with someone who will communicate with you, and give them the gift of communication (expression and listening). When you're with a loving partner you're compatible with, it's just way easier. Instead of spending your time resolving relationship conflicts and trying to work things out, you enjoy co-creating your lives. Yes there are still ups and downs, but your relationship becomes a source of strength for the down times, not the cause.
Relationships take work, but not the kind of work that most people think. They are like nurturing a garden. However, tending a garden doesn't mean trying to turn a daffodil into asparagus. After months, or years, people who try to change their partners usually give up. You can't turn a flower into a vegetable by "trying to work it out". A daffodil is a daffodil, and asparagus is asparagus.
"But I love them," I hear, and then I reply, "Do you love them just the way they are, or do you think you'll be happy once they finally change?" Even if you persevere in trying to get someone to change, odds are they changed for the wrong reasons--your reasons not theirs--and they'll eventually regress and resent you for your intrusion. By the way, I'm talking about attempting to change someone's beliefs and values, not getting them to put the toilet seat down or put the cap back on the toothpaste!
If you're in a compatible partnership, nurture the garden of your relationship with every fiber of your being. Stop taking your partner for granted and continue to fall in love again and again. Be accepting, forgiving, flexible, loyal, honoring, patient, kind, gentle, faithful, and tolerant. Hang in there when times get bumpy. Learn how to communicate. Clean up your act and continue to polish your rough edges.
If you're not compatible, muster up the courage to tell the truth as fast as you can. Like today. If not today, why not? "As the sand passes through the hourglass, so these are the days of our lives." So live. Consider seeing a good relationship therapist or counselor. Better yet, go together if your partner is willing. Then take compassionate action and move on as gracefully as possible.