Praise be to Allah.
Firstly:
Mentioning something and connecting it to its cause (sabab) may be permissible, or it may be haraam, according to what the speaker means when he makes this connection, and what he believes in his heart about the matter.
If he connects the thing to its cause, believing that the cause brought about the result in and of itself, without the will and decree of Allah, may He be exalted,
or he forgets that Allah, may He be exalted, is the true source of blessings, and were it not for His grace, kindness and mercy, no blessings could have reached him and no harm could have been warded off from him,
or he does that out of arrogance, praising himself for having been the one who did it, and were it not for him, such and such would not have happened,
then in these three scenarios, attributing the thing to its cause or means is haraam, and may constitute shirk, either minor or major, according to what the speaker believes.
It is not permissible to believe that means and causes may yield results in and of themselves. This is contrary to what one is required to believe in of the Lordship (ruboobiyyah) of Allah, may He be exalted, and that He is the Creator of all things, and it is contrary to what one is required to believe in of the divine will and decree.
Similarly, it is not permissible to overlook the fact that all blessings come only from Allah, may He be exalted, because overlooking this fact is denying His perfect kindness and generosity, and His perfect control.
Allah, may He be exalted, says (interpretation of the meaning):
“And whatever you have of favor - it is from Allah. Then when adversity touches you, to Him you cry for help”
(an-Nahl 16:53)Holy Quran