In my experience (math, small european university), this is the romantic idea of a Ph.D. more than how it ends up being in practice.
In my case (and quite a few others around me), a Ph.D. is some research of varying novelty and complexity, far from making you an expert in the subject(s) at hand, but hopefully enough for your committee to think you deserve the title. In the cases I'm talking about, you're far from becoming this idealized "expert in your specific subfield" with new insights and that further researchers will base their work on; it's mostly grabbing whatever small questions you can try to explore and if possible answering them.
Still, I think the idealized version does hold for quite a few people, if not all of us.