ذَٰلِكَ هُدَى ٱللَّهِ يَهْدِى بِهِۦ مَن يَشَآءُ مِنْ عِبَادِهِۦ ۚ وَلَوْ أَشْرَكُوا۟ لَحَبِطَ عَنْهُم مَّا كَانُوا۟ يَعْمَلُونَ
That is the guidance of Allāh by which He guides whomever He wills of His servants. But if they had associated others with Allāh, then worthless for them would be whatever they were doing.
Dimensional Analysis
Context
(To them) and to their fathers, and progeny and brethren: We chose them, and we guided them to a straight way.
This is the guidance of Allah: He giveth that guidance to whom He pleaseth, of His worshippers. If they were to join other gods with Him, all that they did would be vain for them.
These were the men to whom We gave the Book, and authority, and prophethood: if these (their descendants) reject them, Behold! We shall entrust their charge to a new people who reject them not.
Related Verses
واللهُ أعلمُ بالصَّواب