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:61:3

Great is hatred in the sight of Allah that you say what you do not do.  

It is greatly loathsome (maqtan is for specification) to God that you say (an taqūlū constitutes the agent of ˹the verb˺ kabura, ‘it is great˹ly˺’) what you do not do.
القرآن:٦١:٣

كَبُرَ مَقْتًا عِنْدَ اللَّهِ أَنْ تَقُولُوا مَا لَا تَفْعَلُونَ  

{كبر} عظم {مقتا} تمييز {عند الله أن تقولوا} فاعل كبر {ما لا تفعلون}.

See similar narrations below:

Collected by Dārimī
darimi:182Abū Nuʿaym > Sharīk > ʿAṭāʾ b. al-Sāʾib > Abū al-Bakhtarī > ʿAlī Riḍwān Allāh ʿAlayh > Yā Bardahā > al-Kabid

It is a sign of having knowledge that, when you do not know something, you say: 'Allah knows better.' Allah said to his Prophet: 'Say: No wage do I ask of you for this (Qur'an), nor am I one of the pretenders (a person who pretends things which do not exist)' (38.86) When the Quraish troubled and stood against the Prophet ﷺ he said, "O Allah! Help me against them by afflicting them with seven years of famine like the seven years of Joseph." So they were stricken with a year of famine during which they ate bones and dead animals because of too much suffering, and one of them would see something like smoke between him and the sky because of hunger. Then they said: Our Lord! Remove the torment from us, really we are believers. (44.12) And then it was said to the Prophet (by Allah), "If we remove it from them. they will revert to their ways (of heathenism)." So the Prophet ﷺ invoked his Lord, who removed the punishment from them, but later they reverted (to heathenism), whereupon Allah punished them on the day of the Battle of Badr, and that is what Allah's Statement indicates: 'Then watch for the day that the sky will bring forth a kind of smoke plainly visible...we will indeed (then) exact retribution.' (44.10). (Using translation from Bukhārī 4822)  

الدارمي:١٨٢أَخْبَرَنَا أَبُو نُعَيْمٍ حَدَّثَنَا شَرِيكٌ عَنْ عَطَاءِ بْنِ السَّائِبِ عَنْ أَبِي الْبَخْتَرِيِّ عَنْ عَلِيٍّ رِضْوَانُ اللَّهِ عَلَيْهِ قَالَ يَا بَرْدَهَا عَلَى الْكَبِدِ

أَنْ تَقُولَ لِمَا لَا تَعْلَمُ اللَّهُ أَعْلَمُ