As Miguel ELE said, massive amounts of input. I will add "writing and then more writing."
One of my students recently achieved a C1 level. Briefly, he is a French-speaking lawyer who has a good level of school English. He and his wife moved from a francophone region into a bilingual region where English is dominant. They both work in a francophone environment but are expected to have functional English (about B1-B2) for situations involving anglophones. He and his wife lacked confidence and wanted a higher level of English.
For about six months, he and his wife took weekly two-hour conversation lessons with me (about 50 hours). In that time, we fixed assorted grammar, vocabulary, and pronunciation faults. They regularly read English news and magazines that appealed to them. They became fluent for discussions about work and family. Let's call it B2.
For the following six months, they continued to take two-hour conversation lessons (another 50 hours) and started reading novels. Importantly, they started writing about a range of topics (childhood memories, difficult situations at work, ...). The writing pushed them to a new level.
Now, in speaking and writing, they are indistinguishable from C1 bilinguals who grow up in this region. They have a hint of a francophone accent and occasional vocabulary problems with false cognates.