There is a famous quote attributed to Henry Ford: "Whether you think you can, or you think you can't—you're right." While it's not 100% certain that he said that, it is generally accepted to be in line with his philosophy of life.
The idea is that your beliefs affect your effort, which cause your reality to come true (either way). The psychology term for this is the Self-Fulfilling Prophecy, a concept that demonstrates that your beliefs affect your behaviors, thus leading to the outcome you believed to be true.
The interesting thing about meaning in life—and, in this context, we're referring to life having significance to you—is that it is subject to the same influence of belief. If you believe life that life has meaning, it will have meaning to you; if you belief it doesn't, it won't. In essence, whether you believe it to have meaning or not, you're right.
This is why the only philosophy I will ever pick on in my writings is Nihilism: life has no meaning not because it's true...but rather because the person believes it to be true and so creates that reality for himself or herself. That's kind of sad to think about, but it's why it's so hard to get out of depressed and nihilistic states: if you created that state, then it's now reality and it takes you to change your beliefs before the reality changes back. And here's the thing: if you only believe that you only believe things based on evidence, then you'll never be able to get out because there will either be no evidence to the contrary at that point (based on what you created for yourself) or, even if there is, you will ignore or dismiss any evidence due to confirmation bias. In essence, you're stuck in a hole of your own creation, refusing to do anything to get yourself out of (and possibly even digging yourself into a deeper hole).
At that point, there are only three things that can happen:
Unfortunately, all three require the changed belief in the nihilist to start to see meaning in something again after believing in nothing. Usually, believing in nothing is correlated with negative feelings or perspectives regarding their reality, such as experiencing loss, failure, or pain. The reason for this is that positive people care about things, are generally happy, and find interest in various aspects of the world around them. Negative people generally don't find the point of doing anything because they are only thinking about the bad result they experienced.
That is why it can be difficult for any of those three things to turn someone's life around: the person trying to change might experience setbacks and revert; the person seeing the random positive event might be similarly discouraged by a random negative event; they might discount the help of someone for made-up reasons (some personal favorites I used in my pessimistic days: "You only care because we're related" and "We're only friends because we're co-located"—partially true, but you can also hate people you're related to or colocated with). The idea of the feeling of meaning, purpose, and significance being one in your mind and not some intrinsic value is very, very real.
One of my favorite extemporaneous points that I made on a podcast was when I said:
"Why do you go to the refrigerator? You go because you're hungry (i.e., desire for food) and you know that food is in there (i.e., belief in the existence of food). If either of those things were not true, you wouldn't go to the fridge. If you didn't want food, you wouldn't be motivated to go; if you didn't think there was any food in there, you would go somewhere else for food instead. Now, what's interesting is that most people think that what really matters is whether there's food in there because it doesn't matter whether you believe or not if it's empty. But that's surprisingly not true. It matters more your belief—because if you don't believe, you won't go at all. If you believe and you're wrong, you'll then go to the next place where you believe that food is. The belief is more important than the reality."
I surprised myself with that statement because I had never thought of it that way before. I was just trying to make a cute, counterintuitive point about how your beliefs matter as much as reality, but then I ended up with an example that made it even more counterintuitive: your beliefs matter more than reality. Why? Because, as discussed above, your beliefs create reality. No, I'm not referring to the New Age definition where your beliefs make things happen by magic (that can't be proven, though I don't discourage anyone from believing in anything they wish about what exists outside of the physical universe since no one can neither prove nor disprove anything non-physical); I am referring to the self-fulfilling prophecy effect that your belief will cause you to act in a way that makes that belief true. So if you believe that life has meaning, you will believe that your life has meaning. (note: that is both a tautology and a causal loop statement)
So that's my advice to you today: if you want to feel like life has meaning, then believe that life has meaning. Find things that you care about (caring is the act of assigning meaning to things; if you care about life and things within it, then it by definition means something to you) and consciously try to care more about things by investing your time, effort, and attention. Since life has the meaning that you assign to it, if you assign meaning, it will have meaning. That's for you to decide. And, unfortunately, that means that you can give it no meaning and be a nihilist. That's the freedom you have in this universe: the freedom to choose to believe whatever you want and do whatever you are physically capable of doing. Don't look for some objective meaning; find things that have meaning to you and focus on those things. I always recommend growth to be at the center of whatever you care about, as growing or fostering growth is the source of all meaning in life, but whether you find meaning in music because it helps you grow emotionally or you find meaning in math because it helps you grow emotionally...it's all up to you.
Believe that life has meaning, look for meaning, find meaning, and live that meaning. That's all there is to it. Or not, and you will find your nihilism validated everywhere you look. Either way, you're right.