Surah Al-An'am (الأنعام) · verse 88 (Meccan · Juz 7 · page 138)
ذَٰلِكَ هُدَى ٱللَّهِ يَهْدِى بِهِۦ مَن يَشَآءُ مِنْ عِبَادِهِۦ وَلَوْ أَشْرَكُوا۟ لَحَبِطَ عَنْهُم مَّا كَانُوا۟ يَعْمَلُونَ ﴿88﴾
التفسير الميسر
ذلك الهدى هو توفيق الله، الذي يوفق به من يشاء من عباده. ولو أن هؤلاء الأنبياء أشركوا بالله -على سبيل الفرض والتقدير- لبطل عملهم؛ لأن الله تعالى لا يقبل مع الشرك عملا
Sahih International
That is the guidance of Allah by which He guides whomever He wills of His servants. But if they had associated others with Allah, then worthless for them would be whatever they were doing
Marmaduke Pickthall
Such is the guidance of Allah wherewith He guideth whom He will of His bondmen. But if they had set up (for worship) aught beside Him, (all) that they did would have been vain
Abdullah Yusuf Ali
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