Abu Ayyub al-Ansari reports that the Messenger of Allah ﷺ heard a sound at nightfall and said: يَهُودُ تُعَذَّبُ فِي قُبُورِهَا
Jews are being punished in their graves. (Sahih al-Bukhari, Book of Funerals)
This report is a separate Prophetic proof of punishment in the grave. The Prophet ﷺ was made aware of this unseen condition by Allah and informed others of it.