Surah Yunus

10:99

وَلَوْ شَآءَ رَبُّكَ لَءَامَنَ مَن فِى ٱلْأَرْضِ كُلُّهُمْ جَمِيعًا ۚ أَفَأَنتَ تُكْرِهُ ٱلنَّاسَ حَتَّىٰ يَكُونُوا۟ مُؤْمِنِينَ

And had your Lord willed, those on earth would have believed - all of them entirely. Then, [O Muhammad], would you compel the people in order that they become believers?

Tafsir 10:99

If your Lord, O Messenger, had willed for everyone on earth to believe, they would have done so. However, He did not will it to be so for a wise reason. He misguides whomever He wills through His justice; and He guides whomever He wills through His grace. You do not have the ability to force people to become believers: their guidance to faith lies only in Allah’s Hands.