Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:43:87

And if you asked them who created them, they would surely say, "Allah." So how are they deluded?  

And if (wa-la-in: the lām is for oaths) you ask them who created them, they will surely say, ‘God’ (layaqūlunna: the indicative nūn and the ˹plural˺ person indicator wāw have been omitted). How can they then deviate?, ˹how˺ can they be turned away from worshipping God?
القرآن:٤٣:٨٧

وَلَئِنْ سَأَلْتَهُمْ مَنْ خَلَقَهُمْ لَيَقُولُنَّ اللَّهُ ۖ فَأَنَّىٰ يُؤْفَكُونَ  

{ولئن} لام قسم {سألتهم من خلقهم ليقولنَّ الله} حذف منه نون الرفع وواو الضمير {فأنَّى يؤفكون} يصرفون عن عبادة الله.

See similar narrations below:

Collected by Qurʾān
quran:29:61

If you asked them, "Who created the heavens and earth and subjected the sun and the moon?" they would surely say, "Allah." Then how are they deluded?  

And if (wa-la-in: the lām is for oaths) you were to ask them, namely, the disbelievers, ‘Who created the heavens and the earth and disposed the sun and the moon?’ They would assuredly say, ‘God.’ So how then are they turned away?, from affirming His Oneness after affirming that ˹God created them˺.
القرآن:٢٩:٦١

وَلَئِنْ سَأَلْتَهُمْ مَنْ خَلَقَ السَّمَاوَاتِ وَالْأَرْضَ وَسَخَّرَ الشَّمْسَ وَالْقَمَرَ لَيَقُولُنَّ اللَّهُ ۖ فَأَنَّىٰ يُؤْفَكُونَ  

{ولئن} لام قسم {سألتهم} أي: الكفار {من خلق السماوات والأرض وسخَّر الشمس والقمر ليقولُنَّ الله فأنّى يؤفكون} يصرفون عن توحيده بعد إقرارهم بذلك.
quran:37:151

Unquestionably, it is out of their ˹invented˺ falsehood that they say,  

Lo! it is indeed out of their ˹own˺ mendacity, their ˹own˺ lies, that they say,
القرآن:٣٧:١٥١

أَلَا إِنَّهُمْ مِنْ إِفْكِهِمْ لَيَقُولُونَ  

{ألا أنهم من إفكهم} كذبهم {ليقولون} بقولهم الملائكة بنات الله.