Anas (Allāh be pleased with him) reported that the Prophet Muḥammad (Peace and Blessings of Allāh be upon him and his family) said,
“If a Muslim plants a tree or sows seeds, and then a bird, or a person or an animal eats from it, it is regarded as a charitable gift for him.”
(Al- Bukhārī)