My suggestion: try to find and maintain a longer-term perspective centered on yourself and becoming who you want to be. From my late teens to mid-20s, dated around but my relationships only lasted several months. From my mid-20 to mid-30s, my I had a few multi-year relationships including living together. They were nice but didn't ultimately have staying power.
After the last one of those ended in my mid-30s, I dated around a bit again but being more experienced, more mature and knowing myself better, it was pretty easy to tell in the first couple of dates whether the relationship had any real potential. None did and I'd break them off nicely but quickly. I sort of got fed up with repeating what started feeling like a cycle. Pleasant enough but ultimately treading water.
After reflecting on things, in a moment that felt like remarkable clarity, I decided I'd rather spend the rest of my life "alone" rather than another minute dating women where I felt I was compromising. By "alone" I meant "without an ongoing romantic partner" and instead spending time socially with my friends, family, coworkers, etc. I just felt like it would be more true to myself if I spent the time and energy I'd been putting into the search for the "special someone" into myself instead. So... I just stopped looking. There wasn't much externally observable change but internally I felt a lot different. I put more time into myself, my hobbies, career, friends and focused on my life priorities, which no longer included a gaping desire for that "someone".
The next couple years were remarkably productive. Good things happened. I made a lot of progress toward things that mattered to me and I felt 'satisfied' in a way I hadn't before. I liked who I was becoming and didn't feel like I needed someone else. My attitude was: if a relationship happened, that would be fine but I no longer feared that it wouldn't happen. Instead, I kind of expected it not to happen, because I wasn't doing anything in that direction, and I was perfectly okay with that.
So I was getting close to 40 when I finally met someone who was different. She realized I was different too. Technically, according to my friends, she was "way out of my league", over a decade younger than I but I never really thought about that because I had no pressing need to make anything work. I was happy to spend time with her but also remained focused on my journey. She was focused on herself too and wasn't looking for... anything really.
And it worked out. After having assured each other that neither of us wanted to ever get married to anyone, we moved in together as romantic partners "for as long as it lasts, which shouldn't be a minute longer than it should". We're still together today, our kid is in middle school and doing great. We did get married along the way but more as just a formality than to 'keep' one another. My wife says what made me different was that I didn't need her. She says she was attracted by my 'calm confidence' which she felt was rooted my being being "a whole person, instead of a person with a hole they're trying to fill".
I think my earlier romantic relationships didn't work out because I wasn't the right person yet. First, I needed to become a whole person on my own terms. Other people and relationships may be different but for me it really was that internal shift in perspective that enabled breaking out of the cycle I was in and growing to my personal 'next level'.