I'm not a life-coach, nor am I a psychologist. However I do think about, and search for content that answers problems such as these. So don't take my advice as gospel.
I would recommend two things to take into consideration: meaning, and responsibility. You can't have one without the other. For example, in a relationship that you may want to pursue, maybe the person you're with is someone really special to you, you have to find the meaning behind the relationship. Understand what you want from it, what they want from it, and why. Reasons such as physical attraction, wanting children, compatible professions and so forth don't contribute to the overall meaning of the relationship. What does, however, is the same moral principles - principles such as respect, dignity, discipline. Or the same character, such as wanting to strive to become better, wanting to learn about the multiple areas that define a successful life, and so forth. This is impossible to achieve without taking responsibility - that maybe you are a problem because your principles don't align with theirs, or that your passions and dreams may not be fully realised at the sacrifice of the passion and dreams shared between yourself and your partner.
Taking this dichotomy into consideration, it becomes more clearer to determine a reason to continue living. Give yourself substantial meaning - this will be controversial, but you cannot find meaning that's substantial based on materialistic, temporal, or sentimental things. The reason why you are alive cannot be because of the next movie in the MCU. It cannot be because of your partner. It cannot be because of a memory, or because you want to achieve a particular net worth. This is because once you obtain that particular thing, what next? Are you onto the next thing that temporarily distracts you from the evident pointlessness of your life?
Additionally, you have to take responsibility. You have to head into life knowing its full of suffering and despair, but you have to take responsibility and know that no one other than yourself can fill that void. You have to take the time to plan the steps to further support your meaning, to take sacrifices and uncomfortable situations, to realise error - serious error - is part of finding what will truly make you content, to realise that the more you leave your responsibility to intangible concepts such as God's Will, Astrology, Fate, even (injustice) systems such as racism and sexism, the less likely you are to actualize what you define as meaning.
A few examples of substantial meaning and responsibility are:
Religion. (Yes, this is a controversial take on this website due to people's trauma from it). Christians, for example, take responsibility in knowing that they have a purpose on Earth given by God. That this purpose is cannot be complete by any other individual other than themselves. Their meaning stems from the fact that they are irreplaceable, and serve a significant role of a much bigger purpose. This type of meaning won't disappear, regardless of how much time, or how many activities they do. This is a substantial meaning because it stands the test of time. A typical Christians responsibility is to ensure that their time spent on Earth is used to find and pursue this meaning. They take the responsibility of setting aside their personal wants and needs, because of this meaning. They take the responsibility of knowing that they may not always get what they want, and that they may go through a lot of pain to reach this meaning, but once achieved, they'll feel complete and confident they have lived a good life.
Another example is community. Humans are social animals - regardless of how long someone can go without contacting a human. It's common to find meaning in your community, such as aiming to contribute and support the people and place that define you - this could be your family, your locals, etc. Think about becoming a teacher - your meaning is contributing to the betterment of the next generation. It's educating to the best of your abilities the children that will soon run the world. While corny at first glance, when does anyone with a community, and a passion for educating ever stop teaching? They teach school children in their youth; their children at Middle age and older; their grandchildren at retirement. A meaning that truly does not end, similar to religion, until you die. Their responsibility is typically to understand that maybe their romantic schema won't be as large as they hoped it would be. Maybe the salary they make won't be great. Maybe at times there will be children difficult to work with; children that infuriate them. But they also take the responsibility to not give into these drawbacks. To understand the need to be resilient, and to be content with so little.
While these examples are vague, and may not encompass everything, the basic idea to derive from this is that a reason to live doesn't come from immediate self benefit; it doesn't come from what people perceive to be reasons, but are in actuality just milestones that help distract them from the greater problem. Meaning ultimately consists of giving, not just taking. And when you give, you have to take some responsibility. Is it as straightforward, and easy as I've described it to be? No. It requires a lot of thinking, and a lot of strength because life, again, is filled with suffering, trails and tribulations.
Again, I'm not an all-knowing wizard. It's best to seek further explanation, or better advice from a professional, from books or other media.
Apologies for any typo, incorrect grammar, et al.