Is there a good science fiction story where humanity discovers it’s unalterably getting dumber? As in within a fixed number of generations tool use will cease?
The classic version is Kornbluth's 1951 story "The Marching Morons", itself pretty clearly the basis for Idiocracy.
(You could argue that "The Time Machine" was the original example.)
It's a major plot point in one of the books in the Bobiverse series, though it's a civilisation humanity meets instead of humanity itself (not saying anything more to avoid spoilers).
In Adrian Tchaikovsky's "Children Of Time", there's a generation ship wandering space that's a marvel of human engineering, whose inhabitants are getting dumber every generation and losing the capacity to maintain or even respect the incredible environment into which they were born. Certainly rings a bell.
Aurora by Kim Stanley Robinson. A multigenerational ship's population is losing its ability to maintain the complex mechanisms needed to keep everything functioning.
Idiocracy?
WALL·E
I don’t know in WALL.E they are not so dumb as they are lazy l, infact they are smart enough to do space travel at scale.