Man is free and faith is based upon one’s voluntary choice; it is not to be accepted under compulsion or by imposition.
Allah is Omnipotent and Omniscient, employing His power in such a way that it does not run contrary to His Knowledge. And as His omniscience requires mankind to be free, He never compels them to accept faith by force.
The Prophet (S) has compassionately insisted that people accept the faith on the basis of voluntary acceptance and not through compulsion.
The verse says:
“And if your Lord had willed, whoever is on the earth would have believed, all of them, all together. Will thou then compel the people till they become believers?”
وَمَا كَانَ لِنَفْسٍ أَن تُؤْمِنَ إِلَّا بِإِذْنِ اللَّهِ ۚ وَيَجْعَلُ الرِّجْسَ عَلَى الَّذِينَ لَا يَعْقِلُونَ
“And it is not for a soul to believe except by the Will of Allah, and He appoints uncleanness (of infidelity) on those who do not ponder.”(10:100)
People are neither compelled to accept the faith (according to the previous verse) nor can they succeed in accepting the faith without His guidance and Divine Providence.
Divine favor and Divine Providence shine their light upon the sage and those people who use their reasoning and he who does not meditate and reason under his own volition, will suffer His Punishment and will abide in wretchedness.
The verse continues saying:
“…and He appoints uncleanness (of infidelity) on those who do not ponder.”
Sound reasoning provides the basis for faith and having no faith exhibits ignorant and irrational behavior.
For reference book regarding Quranic Sciences please go through the link below:
https://www.al-islam.org/al-mizan-exegesis-quran-vol-1-sayyid-muhammad-husayn-tabatabai