Sahih al-Bukhari 5815, 5816
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
لَعْنَةُ اللَّهِ عَلَى الْيَهُودِ وَالنَّصَارَى اتَّخَذُوا قُبُورَ أَنْبِيَائِهِمْ مَسَاجِدَ "
Narrated `Aisha and `Abdullah bin `Abbas:
When the disease of Allah's Messenger (ﷺ) got aggravated, he covered his face with a Khamisa, but when he became short of breath, he would remove it from his face and say, "It is like that! May Allah curse the Jews Christians because they took the graves of their prophets as places of worship." By that he warned his follower of imitating them, by doing that which they did.
Full reference and source
Sahih al-Bukhari 5815, 5816 In-book : Book 77, Hadith 33 USC-MSA web (English) : Vol. 7, Book 72, Hadith 706 (deprecated)
View source on Sunnah.com (opens in a new tab)