Philosophers, thinkers, poets, and sages have for centuries attempted to define the meaning of life.
Most notably, Holocaust surviving psychiatrist Victor Frankl chronicled his experiences in German concentration camps in Man's Search for Meaning (1946). It is a powerful and compelling work in which Frankl offers his conclusions on that topic.
Thousands of other books, stories, and legends detail the lives of men and women who searched for life's meaning in their own way.
No, I don't have the ONE answer to what gives life meaning. However, I'm pretty sure that we only realize meaning in our lives when we get beyond ourselves (spiritually speaking).
As a seasoned observer of life and those who live it (both gracefully and not so), I think I can identify a very powerful attractor (to steal from the lexicon of physics) for providing meaning to life.
It seems to me that those who engage zealously in service to others enjoy lives that are full of meaning. Conversely, it seems to me that those who are most committed to themselves, their own fortunes, their own comforts, and their own needs are the best representatives of living lives that are meaningless.
Just a thought.....................for your consideration.