It’s fine to move on, but only after you have done absolutely everything you can to fix the relationship. All too often many think divorce is an “easy” way out, but it hurts everyone involved.
You can be happy in an unhappy relationship as long as your relationship with your own being is strong. Never depend on someone else for your own happiness. Took me 39 years to figure that out but I did it. You can too. Always look within.
God forbid people actually work on a relationship these days. It’s so much easier to quit than communicate or work it out.