Some people are certainly less intelligent than others; some so gravely so that we may correctly classify them as stupid or even mentally retarded.
A dog runs out in front of a car and gets hit. Or a dog may run around some trees or bushes while wearing a long leash and get himself terribly tangled. We may call this dog stupid, and use that as an example of dogs being stupider than humans.
In parallel, one smarter human may see a second human doing something self-destructive that the first human would be smart enough not to do because the first human can predict the consequences while the second person doesn't see them coming quick enough like a bad chess player.
However, stupidity in that sense is only one reason people perform an action that a smarter person would know has a negative consequence. Other causes include addiction, masochism, apathy, gambling, compulsiveness, bad luck, misperception, mental disease, etc. For example, Vincent van Gogh was not a stupid man. Nonetheless, he cut off his ear which is an example not of an act of stupidity but rather of something else, perhaps insanity.