Answer:
Yes!
It is narrated from Ibn Abbas (may Allah be pleased with them both) that the Messenger of Allah ﷺ said:
استعن بالله، ولا تعجز، وإن أصابك شيء فلا تقل: لو أني فعلت كذا لم يصبني كذا. ولكن قل : قدر الله، وما شاء فعل، فإن لو تفتح عمل الشيطان
Seek help from Allah, and do not be helpless, and if some harm reaches you, do not say: “If I had done such and such, such and such would not have happened to me,” but say: Allah decreed it, and what He willed, He did. For indeed the word “if” opens the work of Satan.
Reference: Sahih Muslim, Hadith No. 2664