Anas bin Malik reported,

The Messenger of Allah ﷺ said, "When one of you supplicates, let him be resolute in his request and not say, 'O Allah, give me if You wish,' for there is none who can compel Him."

Azami 10908

Sahih

عن أنس بن مالك قال

قال رسول الله ﷺ: إذا دعا أحدكم فليعزم المسألة، ولا يقولن: اللهم إن شئت فأعطني، فإنه لا مستكره له.

الأعظمي 10908صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Supplications, remembrances, and prayer upon the chosen Prophet ﷺ
Chapter
Rulings on supplication
Section
Determination in supplication, and one should not say, "If You will, then give me"
Numbering
Jami al-Kamil 10908 (2nd edition)
Azami 10908