Abu Hurairah reported,

The Messenger of Allah ﷺ said, "The strong believer is better and more beloved to Allah than the weak believer, though there is good in both. Strive for what benefits you, seek Allah's help, and do not give up. If something befalls you, do not say, 'If only I had done such and such, things would have been different.' Rather, say, 'Allah has decreed it, and He does what He wills,' for 'if only' opens the door to the work of Satan."

Azami 1091

Sahih

عن أبي هريرة، قال

قال رسول الله ﷺ: المؤمن القوي خير وأحب إلى الله من المؤمن الضعيف. وفي كل خير، احرص على ما ينفعك واستعن بالله ولا تعجز وإن أصابك شيء فلا تقل: لو أني فعلت كان كذا وكذا. ولكن قل: قدر الله، وما شاء فعل، فإن لو تفتح عمل الشيطان.

الأعظمي 1091صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Faith
Chapter
Belief in the divine decree and predestination
Section
Commanding strength, avoiding helplessness, seeking help from Allah, and entrusting matters to Allah
Numbering
Jami al-Kamil 1091 (2nd edition)
Azami 1091