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:42:24

Or do they say, "He has invented about Allah a lie"? But if Allah willed, He could seal over your heart. And Allah eliminates falsehood and establishes the truth by His words. Indeed, He is Knowing of that within the breasts.  

Or (am here is like bal) do they say, ‘He has invented a lie against God?’, in ascribing the Qur’ān to God, exalted be He. For if God will, He can seal, He can fortify, your heart, with patience to endure the hurt they cause ˹you˺ by such sayings and otherwise — and God did this. And God will efface the falsehood, which they speak, and vindicate, confirm, the truth with His words, ˹the ones˺ revealed to His Prophet. Truly He is Knower of what is in the breasts, of what is in the hearts ˹of people˺.
القرآن:٤٢:٢٤

أَمْ يَقُولُونَ افْتَرَىٰ عَلَى اللَّهِ كَذِبًا ۖ فَإِنْ يَشَإِ اللَّهُ يَخْتِمْ عَلَىٰ قَلْبِكَ ۗ وَيَمْحُ اللَّهُ الْبَاطِلَ وَيُحِقُّ الْحَقَّ بِكَلِمَاتِهِ ۚ إِنَّهُ عَلِيمٌ بِذَاتِ الصُّدُورِ  

{أم} بل {يقولون افترى على الله كذباً} بنسبة القرآن إلى الله تعالى {فإن يشأ الله يختم} يربط {على قلبك} بالصبر على أذاهم بهذا القول وغيره، وقد فعل {ويَمْحُ الله الباطل} الذي قالوه {ويحق الحق} يثبته {بكلماته} المنزلة على بنيه {إنه عليم بذات الصدور} بما في القلوب.