Maybe Hermione has been too pushy with her academic knowledge in the fanfiction. Harry, who might be feeling stressed or frustrated, tells her off for not considering the emotional and practical aspects of a situation. He could say she's being too much of a know - it - all and not listening to others' ideas.
One reason could be Hermione's excessive worrying. She often frets over small details and Harry might get tired of it and tell her off. For example, if she keeps nagging about the proper way to perform a spell when they are in a hurry during a dangerous situation.
Perhaps in a situation where a magical artifact is about to explode and destroy everything around it. Harry, being closer to it, decides to contain the blast instead of letting Hermione get hurt. His selfless act of heroism in this 'harry died for hermione fanfiction' is a way to show his deep bond with her, even if it means sacrificing his own life.
In the fanfiction, perhaps Hermione first makes a list of all the characters in the Harry Potter universe who she thinks would be a good match for Harry. She then starts to subtly nudge them towards Harry. For example, she might invite Ginny, Luna, and Cho to a study group with Harry, and gradually, feelings start to develop among them. She could also be the one to smooth out any misunderstandings or rivalries that might occur between the girls vying for Harry's attention.
In some fanfictions, they could have a dance. Harry would be a bit clumsy at first, but Hermione would guide him. They'd laugh and twirl around the room. After that, they might sit on the balcony, looking at the moon and talking about their hopes for the future, like having a family one day or making the wizarding world an even better place.
One possible scenario could be that Hermione is forced to betray Harry under the Imperius Curse. Maybe a powerful dark wizard manages to cast it on her without anyone realizing. Another could be that she betrays him out of a misinterpreted prophecy that she believes will save the wizarding world in the long run. For example, if she thinks handing Harry over to a certain group will prevent an even greater evil from emerging.
Well, in this fanfiction, perhaps Harry and Hermione become really strict prefects. They could be known for always following the rules to the letter. This might make them a bit unpopular among some students at first. But as time goes on, they show that they are fair and only enforce the rules to keep everyone safe. Also, they might use their influence as prefects to get more resources for their studies and share them with their friends. Maybe they convince the teachers to open the library for longer hours or something like that.
One possible scenario could be that in the fanfiction, Harry shows a deeper understanding of Hermione's goals and dreams. For example, he might support her in her academic pursuits more wholeheartedly than Ron. Maybe Harry is more involved in her fight for the rights of house - elves or other causes she cares about.
One possible scenario could be that it's a moment of extreme stress and they find comfort in each other. Maybe they've just survived a close encounter with death eaters and the emotions are running high.
One possibility could be that they meet in a muggle setting, like a local park. Maybe Hermione is reading a book on a bench and Harry, who is always curious, approaches her to ask what she's reading. Another could be that they both end up at the same orphanage for a short time and form a bond over their shared sense of being different from the other kids.
It could be when they find out some bad news about the war against Voldemort. Like if they learn of a major defeat of the Order of the Phoenix. Hermione, being highly empathetic and feeling the weight of the situation, breaks down on Harry's shoulder as he is the symbol of hope in their fight and she needs that connection to keep going.