I went through one ,midlife crises when I turned 35, when I was still in the prime of life and much younger than I thought at the time, but realized I was no longer a true young adult and there were people ten years younger than me who had reached goals that I was still struggling with and likely would never meet. And then, when I turned 50—when, although I was not feeling particularly old but like age was irreversible and advances forward, with poorer health and bodily systems.
For me, I felt that my life would only be complete, or fulfilled, or whole, if I met or had accomplished certain goals. But when I DID reach some of these goals, I found that they did NOT necessarily make me feel like I had reached some goal, nor did they make my life more complete. In fact, sometimes they were more burdensome.
The main thing I felt I was lacking was that I had never fallen in love, married, and had a family. But when I DID fall in love and find who I thought was my soulmate, she turned out to be very ordinary and actually made my life tiresome and restricted. Some of my friends and acquaintances from years past had families but did not have the type of kids I would have wanted (some did, but many were stuck with families I’d never have wanted to be burdened with) toilsome jobs and careers, and even spouses who seemed very ordinary and just someone to share your life and your bed with—but nothing beyond that. It helped me to realize that many of the things wanted when younger would not have been what I hoped they would have been.
Caring for someone else or taking on someone else’s needs usually helped me overcome feelings of midlife crises. But I think @jannbb’s advice is spot on, and would have helped me.