The righteous do not taste the second death;
They Go Straight to Heaven

Do not think that those who are killed in the cause of God are dead, but rather, they are alive at their Lord, being provided for. 3:169

And do not say of those who are killed in the cause of God, "They are dead!" No, they are alive, but you do not perceive. 2:154

They do not taste death therein beyond the first death and He has shielded them from the punishment of Hell. 44:56

It was said, "Enter Paradise." He said, "I wish my people would only know about what my Lord has forgiven for me, and that He made me among the honoured." 36:26-27

The above Quranic words confirm that the righteous do not taste the second death when their lives on this earth come to their predetermined end. The angel of death simply invites them to leave their earthly bodies and enter Paradise; the same Paradise where Adam and Eve once lived. Heaven has been in existence since Adam and Eve. We learn from 89:27-30 that God invites the believers' souls: "Enter My Paradise."

The disbelievers

As for the disbelievers, they know at the moment of death that they are destined for Hell. The angels beat them up on their faces and rear ends (8:50 & 47:27), order them to evict their souls (6:93), then "snatch their souls" (79:1). The Quran teaches that the disbelievers go through 2 deaths (2:28 & 40:11). They will be put to death - a state of nothingness during which they see Hell day and night in a continuous nightmare that lasts until the Day of Judgment (40:46).
As far as people are concerned, the righteous "die". People do not realise that the righteous simply leave their bodies, exactly as in sleep (39:42), and they move on to Paradise. The verses shown above are self explanatory. They tell us that the righteous, even though they die twice, yet they do not taste the second death.