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:65:5

That is the command of Allah, which He has sent down to you; and whoever fears Allah - He will remove for him his misdeeds and make great for him his reward.  

That, which is mentioned regarding the prescribed ˹waiting˺ period, is God’s command, His ruling, which He has revealed to you. And whoever fears God, He will absolve him of his misdeeds and magnify the reward for him.
القرآن:٦٥:٥

ذَٰلِكَ أَمْرُ اللَّهِ أَنْزَلَهُ إِلَيْكُمْ ۚ وَمَنْ يَتَّقِ اللَّهَ يُكَفِّرْ عَنْهُ سَيِّئَاتِهِ وَيُعْظِمْ لَهُ أَجْرًا  

{ذلك} المذكور في العدة {أمر الله} حكمه {أنزله إليكم ومن يتق الله يكفر عنه سيئاته ويعظم له أجرا}.