The Prophet Shallallahu’alaihi Wasallam said:
مَن مات وهو يعلمُ أن لا إله إلا اللهُ دخل الجنةَ
“Whoever dies and he knows that there is no righteous worship except to Allah, he enters heaven” (Narrated by Muslim no. 26).
Notice here the Prophet Shallallahu’alaihi Wasallam said يعلمُ “to study”. So it is not just saying “laa ilaaha illallah” but it is obligatory to know what it means, what are the conditions, what are the principles, what are the consequences, what is the cancellation and all about it.
Al Hasan Al Bashri said when he was asked: “the people say that those who say Laa ilaaha illallah will surely go to heaven”. Al Hasan said:
من قال « لا إله إلا الله » فأدَّى حقها وفرضها دخل الجنة
“Whoever utters Laa ilaaha illallah, then fulfills his rights and obligations, will surely enter heaven” (Narrated by Al Asbahani in Al Hujjah fi Bayanil Mahajjah, 2/152. Quoted from from Kalimatul Ikhlash Fadhluha wa Syurutuha, 502).
Al Hasan once said to Al Farazdaq, when he buried his wife:
ما أعددتَ لهذا اليوم ؟ قال : شهادة أن لا إله إلا الله منذ سبعين سنة، فقال الحسن : “نعم العدة لكن لـِ « لا إله إلا الله » شروطاً ؛ فإياك وقذف المحصنات
“What are you preparing for today (the day of your death)? Al Farazdaq said: the creed of Laa ilaaha illallah since 70 years ago. Then Al Hasan said: yes right, that’s the provision. But Laa ilaaha illallah has conditions. And you should avoid deeds accusing good woman adultery “(Majmu ‘Rasail Ibn Rajab, 3/47).
Then keep learning tauhid and preach it.