He may also choose to stay quiet during discussions where his knowledge could shine through. Instead of speaking up and showing off his intelligence, he lets others do the talking and only chimes in when it's necessary or when he can play dumb and ask simple questions.
He might pretend to not understand complex concepts. For example, when others are discussing advanced magic theories, he could act confused even though he actually gets it.
One reason could be that he wants to avoid unwanted attention. In the fanfiction world, being overly intelligent might make him a target. Another reason might be that he is trying to fit in with a certain group that values other traits more. For example, if he's in a group that values physical strength over intelligence, he may hide his smarts to seem more like them.
One plotline could be that Harry uses his intelligence to solve a mystery within Hogwarts that has been baffling everyone. Maybe it's about a hidden chamber that has ancient magic secrets. He could use his knowledge of spells and history to figure out how to access it and what lies within.
Maybe he wants to keep it safe from thieves. There could be dark wizards or even some of his schoolmates who might be tempted to steal it.
In some fanfictions, Harry might hide his money in a secret compartment of his trunk. He could use magic to create a hidden space where no one else can find it.
He might obliviate everyone to keep a secret. And hide fanfiction because he thinks it's not suitable for public viewing.
He might want to protect himself. If others know how smart he is, he could become a target. Enemies might see him as a greater threat and go after him more aggressively.
One reason could be that he doesn't want his friends to worry. Harry often takes on a lot of responsibility and might see his sickness as a burden he doesn't want to place on others. Another reason could be related to his enemies. He might fear that if Voldemort or his followers find out he's sick, they'll see it as a weakness and target him more aggressively.
He could use magic items like the invisibility cloak all the time. In fanfiction, the cloak might be enhanced to not only make him invisible but also mask his magical signature, so no one can detect his presence through spells.
In fanfiction, Harry might use his knowledge of the secret passages in Hogwarts to hide from Dumbledore. He could also use Polyjuice Potion to change his appearance and blend in with other students or people in the wizarding world. Sometimes, he could even ask his friends to create distractions so that he can slip away and hide. For instance, Ron and Hermione could start a commotion in one part of the castle while Harry hides in a different, more secluded area.