It’s a natural thing to worry about. The process of evolution is unplanned and unguided. Whether or not genetic information gets passed on to future generations depends only on the conditions of its immediate environment and random chance, not on any future goals. How can an intrinsically purposeless process lead to the existence of purposes?