Materialism is a non-scientific ideology based on the idea that all of existence is made up entirely of matter and/or energy, and that we, and everything we experience, is caused by the interactions of matter and energy. Before materialism became a mainstream belief in the 1800's, virtually nobody in the recorded history of civilization on Earth believed this, and virtually everyone believed in some form of afterlife.
It was really only the ideology of materialism that dictated that there was no afterlife, the "reasoning" being that energetic conditions in matter (our bodies) produced our consciousness. So, when we died, our consciousness would also then end. There was no reason to believe this other than it being an article of materialist faith, because there was no evidence to support this theory.
The belief that there is no afterlife is what is called a claim of a universal negative. Unless one is pointing out a logical impossibility, such as "there are no square circles," such claims are fundamentally irrational because they cannot be supported by evidence. There is no way to demonstrate or provide evidence that no afterlife, of any kind, anywhere, in any format exists, which is why materialists spend their time criticizing and undermining evidence that it does exist. They have no evidence whatsoever to support the position that no afterlife exists, because that claim is an irrational universal negative.
There is an enormous wealth of compelling evidence that consciousness continues after death into a state of existence we call "the afterlife." This evidence comes from multiple categories and decades of worldwide, multicultural evidence, including near death experiences (NDE,) shared death experiences (SDE,) after death communication (ADC,) instrumental transcommunication (ITC,) electronic voice phenomena (EVP,) certified mediumship studies, reincarnation research, hypnotic regression, out of body experiences (OOBEs,) astral projection, quantum physics research, etc. There are countless highly credible testimonies and eye-witness accounts of interactions with the dead and/or the afterlife world.
In the early 1900's four of the top scientists of their time, Dr. Alfred Russel Wallace, Sir William Barrett, Sir William Crookes and Sir Oliver Lodge, investigated the evidence for the afterlife with the intent to debunk it and came away announcing that the existence of the afterlife had been scientifically proven. Since that time the evidence for the afterlife has dramatically expanded and increased in depth, analysis and quality.
In addition to that evidence, the ideology of materialism has been scientifically disproved by 100 years of quantum physics experimentation, including experiments that won the 2022 Nobel Prize in physics. Materialism is false, and so there is no reason to believe consciousness is generated by matter or ends at death. There is no sound ideological or logical reason to deny all of the evidence that an afterlife exists or insist that "there must be some other explanation," when the afterlife conclusion is the most direct, obvious, warranted and rational conclusion.
Belief in the afterlife is the only evidence-based position. It has nothing to do with religious or spiritual beliefs. It is not rooted in any kind of ideology. It is the only rational and logical position if one is relatively well informed about the actual evidence.