Oft asked. Few ponder. Some do. Depends on your personal views.
You can treat this question philosophically, religiously, even politically if you wish.
But TO YOU, personally, what is the meaning of life?
Take it a step further, if you wish: What is the meaning of YOUR life?
This has been my journey.
I was raised atheist and for my youth, that's what I passionately believed.
When I was 10, I thought about this question and ended up with a stance of "life is perception and we make our own meaning". I had no education in philosophy at the time, but was probably influenced a culture that was in turn influenced by modern philosophers (like Nietzche).
At probably 15 or so, my older brother started asking the same kinds of questions for himself and watching him influenced me to look into eastern philosophies, such as Taoism, Confucianism, etc. Eventually I looked in European philosophies and just kinda made my way around to a general survey. My conclusion from that study was that philosophy itself is kind of useless and a very sophisticated way of throwing conceptual darts at a metaphysical dart board, but never knowing if those darts land or not, due to the fact that there was no feedback mechanism to know if one was right or wrong, if one's starting axioms were actually true, if one's logical algorithm took the necessary things into account, etc. It was all speculations in the dark. However, I did conclude that my 10 year old self was also wrong and that there likely was no meaning at all.
Then I discovered sex and forgot about the whole exercise for a few years. Those years were pretty care free. Hakuna Matata and all that.
Probably around 18 or 19, my brother converted to Christianity and I started having weird dreams. Eventually those dreams lead me to my own conversion, especially when things I remember from those dreams started happening in real life. It was all very surreal and confusing from a logical perspective, but I guess all I can say is that the evidence was convincing even though I had no logical explanation for it. I went along with it in a provisional sense that if I EVER found evidence that I imagined the whole thing, I would walk away. That never happened.
Then I got married, had kids, and it all became routine because I spent years being exhausted.
Then my wife decided to divorce me and come out of the closet. (She couldn't find a better man, so she stopped trying). After a year or two of resentment for losing what I had spent 12 or so years building, I found I had the emotional space to reinvest in this whole religion thing. It was a lot of hit and miss though as my mind was a mess of resentment (from the divorce), being in a culture that I hated (I lived in South Georgia at the time), and other just messy stuff. I spent years trying to recreate what I had and eventually came to the conclusion after enough trying and error that it was time to move on (I was never great at processing emotions in this way).
Once I got over myself in that way, I went back to God and said something along the lines of "I don't know what to do or where to go, but you have always been good to me, I trust you to take me to a place that I cannot understand today, please take over". What happened next is that I started having those dreams again and somehow they were healing me. The old resentments are gone. I can look at my life now and the past trauma is stuff I can see clearly and objectively (and the places where I was the problem too). I got remarried and my wife has a similar story and she is truly my best friend. I can look at the world from a place of personal strength and a sense that I am standing on solid ground. I have a career I love. My family is awesome. A lot of good stuff is happening.
What does this have to do with meaning? Honestly, I am still a student of that and maybe one day I will figure it out, but I found what worked for me.