Anas reported Messenger of Allah ﷺ as saying Never does a Muslim plant trees or cultivate land and birds or a man or a beast eat out of them but that is a charity on his behalf. (Using translation from Muslim 1553a)
قَالَ رَسُولُ اللهِ ﷺ مَا مِنْ مُسْلِمٍ يَزْرَعُ زَرْعًا أَوْ يَغْرِسُ غَرْسًا فَيَأْكُلُ مِنْهُ طَيْرٌ أَوْ إِنْسَانٌ أَوْ بَهِيمَةٌ إِلَّا كَانَ لَهُ بِهِ صَدَقَةٌ