Anas reported Allah's Messenger (ﷺ) 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.

📚Sahih Muslim 1553 a