I believe that atheism does not prevent life from having purpose. In fact, it is freeing in the sense that you get to define the purpose for your life! For me, the purpose for my life is to make human society better - more just, more equitable, more sustainable, more loving, more peaceful, more pleasant, more resilient, more creative. Strive toward a vision of a utopia one step at a time. Do my small part in helping to herd humanity in that direction, knowing that it will never happen in my lifetime. Some people will lazily write a utopian idea off as foolish and unachievable. But I think human society has been marching in that direction for thousands of years. The fact that we haven't built the perfect society yet does not mean it cannot happen.
A few more quick thoughts... Note that I did not say more free. While I do think there must be space for personal freedoms in a true utopia, freedom cannot be a goal of it's own. Due to selfishness in human nature, too much freedom will undermine many of the required goals of a utopian society.
Atheism and selfishness are easily intertwined but they don't have to be. As an atheist, there was a time when I believed that everything we do is inherently selfish. It had to be - there is no god and we have no mystical soul which means everything we do is essentially mechanical. We are driven from within. We "choose" to do things because of chemical reactions in our brains that reward us for those choices. While I do believe we are essentially very complicated machines, I've learned it is only trivially true that we do everything for selfish reasons. If you define selfishness as a dopamine hit, and our mechanical brain operates on dopamine to make choices, then of course everything we do is selfish. But through this lense, selfishness loses it's importance and negativity. I have experienced enough in life to know with confidence that I make unselfish choices on a daily basis. These are choices that I do not expect to benefit me in the short term or the long term, but I do expect them to benefit someone else in the short term. I make these choices because that's who I am. I feel good about who I am. I think people worry that if doing something nice for others feels good, then maybe it is selfish. I think this is a case of people getting tricked by the bad argument of equivocation. The definition of selfishness shifts. I would define non-trivial selfishness as choosing something to benefit yourself at the expense of someone else. Trivial selfishness like feeling good about who you are is not at anyone's expense, and the two types of selfishness should not be conflated.
Another challenge I've encountered being an atheist is how to have purpose when I know my life will end, and eventually life on Earth will end too. For me, it is comforting to know that even though my conciousness will be gone forever once I die, bits of me will live on through everyone I've touched throughout my lifetime. Any beneficial influences that I've had on others and on society as a whole may be passed down through generations and help humanity reach the goal one day of a perfect utopia. My hope is that humanity will expand beyond the limits of Earth and spread across the universe so that it is not destroyed when the Sun dies.
I don't have an answer at this point for the idea that the universe will one day die. However, if I can die assuming that humanity survives to the end of the universe, I think I can be at peace hoping that my contributions will have helped move us toward that perfect utopian dream and that we will in fact reach it before the end of everything.