But luckily as humans, we have developed brains so big that we realized that isn't the only purpose of life. For humans, the purpose of life is:
Pleasure.
Doing whatever it takes to make yourself happy, hopefully not at the expense of others. Some people never achieve happiness, some achieve it early with few resources. Some people achieve it over and over as they age and different things make them happy.
In my 20s, building great software and doing well at work made me happy. In my 30s, that continued to make me happy, but since I had some money, adding great meals and fun travel made me happy. In my 40s it's spending time with my kids that is what primarily makes me happy. Who knows what it will be in my 50s and beyond.
You have to find what makes you happy within the resources you have.