We live in accordance with our deep, driving desire. It is this desire at the time of death that determines what our next life is to be. We will come back to earth to work out the satisfaction of that desire.
But not for those who are free from desire; they are free because all their desires have found fulfillment in the Self. They do not die like the others; but realizing Brahman (Cosmic), they merge in Brahman. So it is said:
“When all the desires that surge in the heart are renounced, the mortal becomes immortal.
When all the knots that strangle the heart are loosened, the mortal becomes immortal, Here in this very life only.”Brihadaranyaka Upanishad 4.4.6-7