Many of us spend our lives thinking of science and philosophy. Looking for answers to the meaning of life the universe and our place in it. And then eventually we die. Have we not accomplished anything? Does our knowledge somehow live on beyond death? What is the point of seeking knowledge?
I’m not sure why you think that we’re all gonna die - our heritage will live on, probably forever.
I believe that the universe is infinite, both in space and in time. As such, there is a probability that humanity will continue to exist forever - and so will the consequences of our actions. Therefore, life is not meaningless.