Anas bin Malik reported,

The Prophet ﷺ visited a man from the tribe of Banu Najjar to check on him during his illness.The Messenger of Allah ﷺ said to him, "Uncle, say, 'There is no god but Allah.'"The man asked, "Am I an uncle on the mother's side or on the father's side?"The Prophet ﷺ replied, "On the mother's side."The man asked, "Is it better for me to say it?"He answered, "Yes."

Azami 11096

Sahih

عن أنس

أن النبي ﷺ دخل على رجل من بني النجار يعوده، فقال له رسول الله ﷺ: يا خال، قل: لا إله إلا الله فقال: أو خال أنا، أو عم؟ فقال النبي ﷺ: لا، بل خال فقال له: قل لا إله إلا هو قال: خير لي؟ قال: نعم.

الأعظمي 11096صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Supplications, remembrances, and prayer upon the chosen Prophet ﷺ
Chapter
Supplications for illness and funerals, and what relates to them
Section
Prompting the dying person to say the word of tawhid
Numbering
Jami al-Kamil 11096 (2nd edition)
Azami 11096