>>212863086it's Foundation the novel, actually a compilation of short stories published in pulps in the 1940s, that is way before most of the usual sci-fi tropes you can find inside became tropes. it's actually Asimov who popularised them.
but there are two others novels/compilations which continue the story.
plus two sequel novels written decades later and two other prequel novels written even later. those have a very different tone and more or less ruin the original ruin by trying to tie it with Asimov's 1950s robot novels which were never planned to be in the same continuity.