Maybe she's caught in a dangerous spell gone wrong. If a spell she or someone else casts backfires and starts to cause chaos around her, like objects flying at her or strange illusions appearing, that would be a valid reason for her to scream.
Maybe she got injured while riding a horse. In many stories, horse - related accidents can cause pain.
One possible reason could be a sudden outburst of pent - up emotions. Maybe Hermione has been bottling up her feelings for a long time, and in the presence of Draco (in the context of the fanfic), something triggers her to break down. It could be a situation related to the ongoing conflict between Gryffindor and Slytherin in the Hogwarts setting, and Draco represents all the stress and frustration she has with that divide.
Perhaps there was some kind of magical accident or strange phenomenon that involved Professor McGonagall. Hermione, being the curious and sometimes easily startled girl, might scream in shock when witnessing it.
There might be some kind of misunderstanding. For example, Ron could have been misinformed about Hermione's actions. He thought she betrayed him in some way, like sharing Gryffindor's secrets with Slytherins, so he lashes out at her.
Some characters might immediately rush to her aid. Harry and Ron, for instance, would be very concerned and would do everything they could to figure out what was wrong and protect her from whatever was causing her distress.
Perhaps there are situations where Hermione seems overly possessive. Like when it comes to group projects or activities, if she doesn't like it when others take Harry's attention away from her for too long. Harry could see this as jealousy. Also, it might be related to her competitive nature. If she sees someone else getting praise or attention from Harry that she thinks she deserves more, it could lead Harry to think she's jealous.
Maybe she's yelling at Ron. Their relationship in fanfictions can be quite complex. If Ron says something insensitive or does something stupid, like forgetting an important task that could put their mission in jeopardy, Hermione would surely yell at him.
One reason could be that Narcissa misinterpreted Hermione as a threat to her family or something she holds dear. So she pushed her on the bed as a quick way to immobilize her.
One possible reason could be their shared interest in Ron. Hermione has a long - standing friendship with Ron that might have developed into deeper feelings on her part. Lavender, on the other hand, is attracted to Ron and is more openly affectionate. This competition for Ron's attention could lead to a fight between them in the fanfiction.
It could be that she challenged the teacher's theory too forcefully. Hermione is known for her intelligence and eagerness to prove her point, which might not always sit well with some teachers. For example, if the teacher was presenting a more traditional view on a magical concept and Hermione had new, radical ideas based on her extensive reading, the teacher might take it as disrespect.