I think it comes down to ROI. You exist (for now), which means you have a finite resource of "life time" to invest, and humans are happier and healthier when we feel like we're creating a good return on our investment. We want our "life time" to be put to good use rather than being squandered. This is how I think of "purpose" and as many others have suggested, "Man's search for meaning" really unpacks this idea.
Skills, strengths and passion get lumped into "purpose" but I argue that they are vehicles rather than the destination itself. More on that later.

So the goal is to have visibility of ROI and to be working to make the number go up. Only I can determine my ROI, and it's based on a criteria which is shaped by my values and world-view [0].

For visibility, get clear on your values and world-view. There's a bunch of value-finder exercises online to get the ball rolling, and you can always refine them over time until you have words that resonate deeply for you. [1]
If your world-view adds additional metrics for ROI, write those down too.

To make the number go up, align your investment of "life time" with these criteria. This will inevitably get you out of your comfort zone, taking risks and engaging with life on a deeper level.

I've recently realized that my cushy job isn't aligned with my value of effectiveness, and the low ROI has been enough to shake me out of my complacency. I'm now spending nights and weekends working on a new career path with high ROI, and I feel a sense of direction, motivation and meaning in this pursuit. It's got me more engaged in my life and more willing to take risks because there's a purpose to it all now. Notice how these are all benefits of having "purpose".

Aligning "life time" with values creates a positive ROI, while leveraging skills, strengths and passion helps us increase this number. I propose that a passionate and gifted programmer working on a product that isn't aligned with their values is going to have a lower ROI than their colleague who is just phoning it in for their paycheck.

Doing things you're good at increases your output, and doing things you're passionate about makes the work less-taxing. Mark Manson has an excellent article about finding your favorite flavor of shit sandwich [2] and it's essentially activities in which you have a competitive advantage - let's call this your "niche". Working in your niche helps you do more easier, which amplifies your rate of ROI.

The best tool I've used for finding my niche was doing the Clifton Strengths Assessment with a certified coach [3]. It's nice to have a cute list of "my top 10 strengths" but the real value is how those strengths interact with each other to create the beautiful and unique human that you are, and that takes a professional to really unpack it.

TLDR (courtesy of GPT3):
The purpose of life is to create a positive return on investment (ROI) of our "life time". To do this, we need to be clear on our values and world-view, and then align our actions with these. This may mean taking risks and getting out of our comfort zone, but it will ultimately lead to a more fulfilling life. Skills, strengths and passion can help us achieve our purpose, but they are not the purpose itself.

[0] - As seen in other comments, certain world-views have a prescribed purpose built in to the equation, such as "relationship with God" and "having kids". Others tend to have more of a "do what makes you happy" flavor. This is evident in the ongoing debate between "you have to change the world!" and "no you don't".

[1] - Most systems constrain it to a list of ~6 core values and I've found this is about my limit for keeping them in working-memory.

[2] - https://markmanson.net/life-purpose

[3] - https://www.gallup.com/cliftonstrengths/en/252137/home.aspx