No.
As in neither of those things is the most important thing in life. Everyone has different priorities but many things are more important to many people - such as doing the right thing / being a good person/ making a positive contribution to the world (morality), or family in a wider sense - own children and parents, sometimes wider family, or career success for some.
It's not important to be in a relationship. It's completely valid to choose a single life.
Being happy is lovely, but nobody is happy all the time - that's been an acknowledged truth since before Homer wrote about the Lotus eaters over two and a half thousand years ago...
Lots of things are important, but generally over the long term a relationship should make you more not less happy and content. Being in a relationship is not important in itself. Your own specific marriage is a commitment you've entered into and deserves working at but isn't more important, as a thing in itself, than happiness.
If you don't have children and your husband makes you miserable constantly, then you can decide whether to get couples therapy if you used to be happy and think you can get back to that - if not then leave! If you have children together get couples therapy and try and work it out so you can be happy, but in the end of despite trying to work on it, or if he won't engage, it is likely to be better if you separate.