Wernicke's and Broca's areas of the brain are the ones you're looking for.
Damage caused to Wernicke's area results in receptive, fluent aphasia. This means that the person with aphasia will be able to fluently connect words, but the phrases will lack meaning. This is unlike non-fluent aphasia, in which the person will use meaningful words, but in a non-fluent, telegraphic manner.
Damage to Broca's area is commonly associated with telegraphic speech made up of content vocabulary. For example, a person with Broca's aphasia may say something like, "Drive, store. Mom." meaning to say, "My mom drove me to the store today." Therefore, the content of the information is correct, but the grammar and fluidity of the sentence is missing.
So your language processing goes basically like this:
Your brain thinks of something it wants to say
Wernicke's area concentrates your thoughts into words and passes them to Broca's area
Broca's area adds grammar and fluency to your sentence
You say your fully processed sentence out loud
Both of those areas process text information in a similar way to speech processing. So if you fully lose either one of those regions, you can still process information from your surroundings and think normally, but you fully lose your ability to comprehend or output language; written, spoken, or otherwise.
If you lose either of those areas partially, the effects differ a bit. With damage to Wernicke's, your sentences sound normal but they don't have any meaningful content, since Wernicke's area cannot fully process what thoughts you want to convey with language. With damage to Broca's, your brain cannot encode the thoughts picked up by Wernicke's to fluent language, so you can burst out single words at best (which do have meaning). The effect works both ways, so it is similar when tried to comprehend received sentences.
Now, if you want to go with gibberish, the obvious solution is to do some damage to Wernicke's region of the brain. This way people will still talk and write, but it will make no sense. Telepathic communication might still be possible, since the actual thought process is not really impaired.
Now, how can you do 'alotta damage' to this specific region of the brain? Easy answers are CRISPR gone wrong, virus, fungus, amoeba, whatnot. But if your story is set into the near future, one nice way would be cybernetic implants. Brain implants are not too far in the future.
Imagine a world where everyone has a cybernetic implant planted into Wernicke's area to store memories digitally. This is at least pseudo-reasonable, since Wernicke's area essentially concentrates thoughts. Now, in a world with everyone having electronics in their head, a catastrophic solar storm could have huge consequenses. The implant is fried and everyone gets their Wernicke's area irreparably damaged.
What few people might have remained without implants would have no use for their language, since nobody can understand them. Children would be born having their Wernicke's intact, but teaching language to children when you can't understand it yourself would be problematic.
In any case, your protagonist could be someone who did not have an implant, and who therefore survived the catastrophe.