The Prophet ﷺ said, "By Allah, for one of you to take a rope, gather firewood, carry it on his back, then eat from its proceeds or give in charity, is better for him than to come to a man whom Allah has enriched from His bounty and beg from him, whether that man gives him or refuses him. That is because the upper hand is better than the lower hand."
حدثنا سفيان عن أبي الزناد عن الأعرج
عن النبي ﷺ والله لأن يأخذ أحدكم حبلا فيحتطب فيحمله على ظهره فيأكل أو يتصدق خير له من أن يأتي رجلا أغناه الله من فضله فيسأله أعطاه أو منعه ذلك بأن اليد العليا خير من اليد السفلى
Its chain of transmission is sahih. Muslim (1:284) narrated it at greater length in similar wording, from the narration of Qays bin Abu Hazim from Abu Hurairah, adding at the end, "Start with those you support." Malik narrated it in Muwatta (998-999) from Abu Zinad from Araj, but did not mention at the end that phrase about the upper hand being better, and so forth. Bukhari (3:265) likewise narrated it through the route of Malik. Bukhari also narrated it in abridged form (3:271) from the hadith of Abu Salih from Abu Hurairah, and likewise Bukhari (4:260, 5:35) and Muslim (1:284) both narrated it from the hadith of Abu Ubayd, the freed slave of Abdul-Rahman bin Awf, from Abu Hurairah. As for the hadith about the upper hand, it has been narrated through another route, 7155.