Just because you might like something to be true or even need it to be so to fit with your philosophical beliefs, doesn't mean it is so. You can wish and wish and wish as hard as you like for there to be an after-life, but that means not a jot in terms of whether there is or it isn't.
I agree with that. But we humans cannot help formulating hypotheses to explain life and its purpose. Scientists may keep saying that there need not be any answers to our philosophical questions...but that is neither here nor there.
We can adopt a purely materialistic view saying that its all just a chance happening beginning with the Big Bang. Life is just an inevitable consequence of initial conditions. No after-life, no God, no soul, no purpose, no nothing.
Alternatively, we can adopt a religious view such as that of the Abrahamic religions. One God, one time creation, soul, after-life, Judgement day, heaven and hell.
Or alternatively again, we can adopt a Hindu view which also happens to be secular and is not specifically religion based. Existence of a universal Consciousness that is the source of creation. Life is illusionary (maya) like in a VR game. Spiritual evolution of life from lower forms of consciousness to higher forms of consciousness. Soul (atma), after-life, Karma, reincarnation, spiritual progress life after life to eventual freedom. An ongoing process like the water cycle.
First idea is a default one based purely on sensory inputs. Second is a belief based on scripture. The third is speculative but has some evidence in the form of NDE's, reincarnation research by Jim Tucker etc. Philosophies such as Cosmopsychism and panpsychism support this view.
Take your pick...