The dead is punished in the grave because of wailing on it.

Sahih Muslim Book 11 Hadith 21

Sahih Muslim #927 b

The Book of Prayer - Funerals 11:21

Umar reported Allah's Apostle (ﷺ) as saying:

The dead is punished in the grave because of wailing on it.

Chapter: The deceased is tormented because of his family's crying for him

Grade: Sahih