People don't have "souls".
Problem solved. You are welcome.
The issue is more complicated, even if you're an atheist (I'm not but that's not relevant). Soul can mean more than something that lives on past death but a certain Greek "spark of life" which renders something a person.
What's the difference between Data, Moriarty, the Doctor, your typical hologram, and a very well-done computer simulation? In Star Trek, the question of simulating life is an issue which is relevant because a simulation is not real. However, if that simulation is real enough to FEEL that is a person. If a simulation does not feel but merely is following its programming, it's not.
Yet, what is instinct if not programming?
Also, while Gene Roddenberry was an atheist, the Star Trek universe is composed by people who have expanded it tremendously beyond and in some places against his vision. Bill Shatner's Star Trek is a deistic universe while accepting DS9 as part of "your" canon also means that it's a universe where literally true supernatural religion is not in conflict with science.
It's more ambiguous in TNG and Voyager but even TOS has implications that religion isn't so much wrong as misinformed.