To sum up: in matters of divine command the servant must hold fast to two foundational principles, and in matters of divine decree he must likewise hold fast to two.
With respect to the commands, he is required to strive for compliance both in knowledge and in practice: he must persevere in learning what Allah has enjoined and in acting accordingly. After that, he must seek forgiveness and repent for any shortcoming in fulfilling what is required of him or for any transgression of the limits.
For this reason it is legislated that every act of worship be concluded with seeking forgiveness. Whenever the Prophet ﷺ finished his prayer, he would say astaghfir-ullāh three times. Allah, exalted is He, says, “…and those who seek forgiveness before dawn” (Q 3:17); they would spend the night standing in worship and then seal it with seeking forgiveness. Furthermore, the last surah to be revealed contains His words