It can be very different because everyone is different.
It can also be different depending on strategy if one decides for one’s own to first “create the test”, and then only later actually master the language to the C2 level.
An example of what I meant in the second paragraph: I am now leading a course for people who are to pass the B2 exam relatively soon.The course is intensive, full-time and multimedia anyway, so they learn 4 to 6 hours a day. 90 minutes of it they do with me – conversation, clarify some aspects and go through, strategies for learning, culture – you will make it in 6 to 9 months from “zero-clue” to B2. In less than two months we have basically seen the whole German grammar by speaking or reading relevant content together (I have only konj. I and a few special aspects). Now it’s about expanding the vocabulary and using the conversation parts so that we see this grammar “in use.” Before the exam, we will then “practice the test”. Whether they actually speak German at a B2 level during the exam, I don’t know, because you probably can’t build up the vocabulary completely in 6 to 9 months. Nevertheless, they are then certified as B2.
The same applies to a C2 level in a similar way.The grammar for this can easily be seen in a few weeks or months if you have the right basics. Building the Wortschaft is unfortunately the real problem of the German (and also the English). I have already written a few things about this in an indirect way: Answer by Felicita Ratti to Which language is more difficult: German or Italian? or Felicita Ratti’s answer to Which MCER level of German and Italian do you need in order to be read to read “I mean, not adapted” books? If you want to achieve the certification, you can probably plan it strategically and also create “rapid” (but less than a year I find it unrealistic now, because you want to reach at least one intermediate level, and then “falsify” a C2).
If you really want to speak C2 German, it usually takes years, except perhaps for some [specialist/areas) where you become competent more quickly, because you meet them professionally or passionately every day.
The C2 level is also something special, as many native speakers (especially German native language!) will somehow/at some point find something “critical” in your language, and these critical aspects will be traced back to your origins, using the same things would be overlooked by a “local”.Typical of me: I use an Austrian variant, the Germans mark it as a mistake!