It happens just like it does with humanity
For God so loved the world that he gave his one and only Son, that
whoever believes in him shall not perish but have eternal life. - John 3:16
I am a Christian and I believe that is true. Though I am not so familiar with other religions, I am reasonably sure that the other Abrahamic religions (Judaism, Islam, Mormonism) hold such scriptural promises in similarly high esteem. There are about a billion Christians around and a similar number of Muslims. So we can say with some confidence that there are billions of humans who know that there is a benevolent afterlife that they can reach.
As a digression, I would argue that the promise of said benevolent afterlife is the most important part motivating religion. Religion often doesn't offer that much on Earth; it forbids such enjoyable things as sex, wealth, booze and bacon; it requires such onerous sacrifices as tithing, turning the other cheek, and even martyrdom. So the promise is one that many people wrestle with: what happens when I die? For many people the promise of comfort and salvation from the yawning void of forever is what makes you religious. I can tell you from first person experience the difference between hearing about the afterlife and knowing about the afterlife.
Back to the main argument, if we accept that billions on Earth do believe in a benevolent afterlife, then those same people as a whole display fear of death and mourning for those loss. The reasons are many, but can include fear of the pain that often accompanies dying, prioritization of the present over a nebulous future (i.e. I want to see my dad today, not in heaven), and general uncertainty about the truth of the afterlife--lack of faith.
Faith and reason, fragile apart but strong together, are ever at war in the mind and soul of Man. The fruits of this struggle are fear and doubt, bubbling up from the sub-conscious, threatening to destroy both.