Why can humans worship God but animals cannot?
The assumption is not correct. According to the Holy Qur’an everything that has been created praises God, animals included, each creature in its own way, even if we do not understand it.
The question assumes that only human beings worship God. The Holy Qur’an sees it differently. It says that everything in the heavens and on the earth glorifies God. This includes the birds, the animals and every other creature. We simply do not understand their praise. In some respects animals do this more faithfully than many people, as the third verse above suggests.
Worship takes many forms. The very awareness of being alive is a great gift from God. Every living being, at its own level, has some awareness of itself. It senses what it needs and finds what it needs. Within this awareness there can be a sense of the Creator and a kind of gratitude for life.
An example makes this clear. Small creatures that live in mud look poor and wretched from a human point of view. But put them in a bowl of sweet pudding and they will suffer. Put them back into their mud and they thrive. God has created every creature so that its surroundings suit it perfectly and it finds everything it needs. Why should such a creature not praise its Creator?
Human beings have a special form of worship. They can consciously and freely choose to serve God, to come to know Him and to speak to Him. That is a privilege, and also a responsibility. But it does not follow that the rest of creation is silent. The whole world is full of praise, and human beings are invited to join in.