Once, the Prophet Muhammad ﷺ told his companions a story about a man who was walking on a very hot day. The man became very thirsty.
He found a well, climbed all the way down inside, drank some cool water, and then climbed back out.
When he reached the top, he saw a dog. The dog was so thirsty that it was licking the wet sand around the well, hoping for water. The man knew exactly how that dog felt, because he had been just as thirsty a moment ago.
So the man climbed all the way back down into the well. He filled his shoe with water, held the shoe carefully in his teeth so he could climb with his hands, and brought the water up to the dog. The dog drank until it was no longer thirsty.
The Prophet ﷺ told his companions that Allah was so pleased with the man for that one act of kindness that Allah forgave his sins.
The companions were amazed. They asked, "O Messenger of Allah, do we get rewarded even for being kind to animals?"
The Prophet ﷺ answered, "Yes. In every living creature, there is a reward."
Even one small act of kindness to an animal matters to Allah. The man in this story wasn't perfect, but Allah saw his kindness in that moment and rewarded him for it. Every time we help an animal, Allah is watching with love.
From a hadith narrated by Abu Hurairah (may Allah be pleased with him), recorded in Sahih al-Bukhari and Sahih Muslim (mutafaq alayh, agreed upon by both collections).