and His words, exalted is He: “We shall certainly make them taste the nearer punishment before the greater punishment, so that they might return” (al-Sajdah 32:21). The nearer punishment is the torment of the grave, while the greater punishment is that of the Day of Resurrection.
As for the Sunnah, the hadiths affirming the torment of the grave are mutawātir. Among them is the sound report in which the Prophet ﷺ passed by two graves and said, “They are being punished, yet they are not being punished for something considered grave—indeed, it is grave. One of them used to go about spreading tale-bearing, and the other did not protect himself from his urine.” (1)
Another authentic report records that the Prophet ﷺ taught us to seek refuge from four things: “I seek refuge in Allah from the punishment of Hellfire, from the punishment of the grave, from the trial of life and death, and from the trial of the False Messiah.” (2)
There are many other evidences as well, and at times certain people are even shown scenes of the grave’s torment so that they may take heed and be admonished.
Al-Ḥāfiẓ Ibn Rajab, in his book The Horrors of the Graves and the Conditions of Their Inhabitants,