Mtngrl and Golden have it right.
I NEVER expected to marry when I was growing up. I had poor models, thought my personality wasn't suited and I also wasn't all that interested. To my surprise, I've been extremely happily married for 22 years (together almost 26). We have lived a bunch of places/conditions, lived apart for stretches due to work, and also had long stretches where we've been working and living together nearly 24-7. All of these different arrangements have worked fine for us.
Conventional wisdom that "marriage is lot of work, but worth it" doesn't really resonate with me; although I've found marriage to be terrific, I've never found it to be much work. The REST of life can be a grind, but the marriage is the respite from that. We've had a few tough patches where we needed brief vacations from each other, or where one of us was not handling external pressures well and bringing that dysfunction into the relationship. But that's maybe 3 bad patches, of maybe 6-12 months each?...that required focused attention and effort to keep from irrevocably messing the relationship up. There will likely be a few more bad patches before we shuffle off. But each bad patch teaches you how to be a better partner anyway, so that's a pretty great trade-off IMO for 26 generally great years together.
Picking the correct partner is obviously key. Among my large social circle, there are few divorces, most of the marriages are multi decades long, and most seem quite happy. The divorces have tended to happen in the first few years after marriage, and I suspect that's because people quickly realize they picked poorly.
If you don't respect and admire the person, and you don't dig the idea of hanging around them all day, I would be hesitant. Contempt is the ultimate marriage destroyer.
Marriage won't 'fix' anybody; it requires two already-mature-and-functional individuals, who then commit to a partnership of shared goals, friendship, and romantic attachment. Each person is still an individual, and the partnership has to flex, within reason, to accommodate 'self actualization' and what have you.
NOTHING in life is permanent...everything is forever in flux (irritating to a person such as myself who prefers stability LOL) and the goal isn't to achieve some perfect suspended state of relationship nirvana. Try to pick a partner who isn't locked into one idea about how life and relationships should be to be happy and successful.
Having said that, I expect it's possible to have all the criteria I listed above, and still have daily relationship stress if your habits or communication styles are wildly different (e.g., introvert/extrovert pairings; slob/neat-freak pairings; passive-aggressive/fight-picker pairings, etc. Probably manageable, but could require a lot more daily effort than my marriage does.
As to whether marriage is better than cohabitation? IMO it's preferable and easier to be married if you have kids, but it's not necessary. Some people really find the vows and the public, legal 'statement' to be a profound experiences. However, if the partnership is volatile and separation is a statistically significant risk, I'd keep my finances and legal status separate and stick to cohabitation, because divorce can be a real financial knee-capper.