Misery comes from being attached to things which are temporary. We are attached to people, relationships, like your partner, children, parents. We are attached to our house, car, job, money, property, wealth. We are attached to our bodies, how we look, what we wear, what we eat. There is nothing wrong with all of these except our own desires, attachments, greed, feverishness for them. That's the problem. When we are attached to something, and it goes away, changes, diminishes, decays, dies, or we loose it like money, power, fame, or have a break up in a relationship, or suffer from cancer, or have a death. Then what happens? We are devastated.
See these things are temporary. They come, stay for a little while and then go away. That's why the ancient Sanskrit name for this creation is Jagat, which means exactly this.
Crisis comes and goes, happiness comes and goes, grief come and go, birth-death happens, health-sickness happens, job gain-loss happen, wealth gain-loss happens, relationships form-change-end, expect this. Events come and go, people come and go the world keeps turning.
Now observe your life, you were a child, then a youth, may be married now, or may be a parent now, or may be retired now. See you whole life. Be a witness, that unchanging witness is you.
Just observe the world changing. That observer, that witness, that reference point, that sees everything changing is non-changing and permanent.
Close your eyes and observe your body. Observe the breath. Observe your thoughts as coming and going. Observe your feelings, emotions. Now become aware of the witness that is observing. That is you. It is eternal existence, universal consciousness, and infinite bliss. You are not the inert body, the passing thoughts or feelings. You are the unbound unchanging reality of bliss and consciousness.
This awareness, this wisdom of being able to discriminate between the unchanging and the temporary is the most essential ingredient in order for us to more from misery to freedom. The Vedic term is Vivek. It is covered in many ancient texts including the Tattva Bodha of the great sage Adi Shankaracharya.