The source of this is Acts, xx, 35:
‘I have shewed you all things, how that so labouring we ought to support the weak, and to remember to words of the Jesus, how he said, It is more blessed to give than to receive.’
The last one on the long line of messengers, Prophet Muhammad said:
‘The upper hand is better than the lower hand.’
Which means the exact same as it is better to give than to receive.