Each religion has its own answer to this question. If you are interested in Christianity, then the soul of a baby goes straight to hell, since the original sin was not washed away by baptism.
The soul is the inner world of a person, his personality, consciousness and memory. All this is due only to the presence of a body, no other matrix is known on which this data could be stored, therefore there is no body - there is no consciousness and therefore no soul. Therefore, I think everything just dies and ceases to exist: both body and soul.