The causes of apostasy
Does not know Allah Subhana Wa Taala and His Prophet Muhammad (peace be upon him).
Does not read the Quran. (Take note that I did not say that the person does not study the Quran deeply.) A person who reads the Quran will never reject Allah Subhana Wa Taala as his recitation softens his heart, he becomes attached to Allah Subhana Wa Taala and becomes committed to Islam.
Rejects Allah Subhana Wa Taala and Rasulullah (peace be upon him), out of anger, disappointment.
The person who rejects Allah Subhana wa Taala
A person rejects Allah Subhana Wa Taala and His Holy prophet because he does not know Allah Subhana Wa Taala and His Holy Prophet (peace be upon him).
It is probable that such rejecter also hates Allah Subhana Wa Taala out of anger, disappointment.
It is also most likely that he or she does not read the Quran.
A person who reads the Quran would never hate Allah Subhana Wa Taala nor leave Islam.
So, if anybody comes to you with plans to leave Islam, advise him or her to read the Quran. If he refuses to read the Quran, then ask him to listen to the Quran. It’s not easy to persuade such person so you must pray for Allah’s assistance.