It's also possible that it was Snape, in a more complex scenario. Although he is the potions master, he might have unknowingly set up a situation where Harry collapses. For instance, if he assigned a particularly difficult potion that was too much for Harry's current abilities, and due to Snape's strict and unhelpful teaching style, Harry couldn't ask for proper guidance and eventually collapsed from the stress and difficulty of the task.
A new, mysterious character could be responsible. Maybe there's a new student or a hidden enemy in the school who has some ulterior motive against Harry and decides to target him during potions. This character could have used a very subtle form of magic that's hard to detect, like a charm that slowly affects Harry's strength as he works on the potion.
It could be Malfoy. He often has a vendetta against Harry and might have found a way to make him collapse during potions class, either by tampering with his ingredients or distracting him in a way that leads to a mistake in the potion - making process.
Maybe he was poisoned. There could be someone who slipped a harmful potion ingredient into his cauldron without him noticing. It's a common plot device in fanfics to create drama.
It could be a case of betrayal from within. Maybe someone who was thought to be an ally, like a wizard who was secretly working for the dark side all along. They could have used a powerful and unknown curse to kill Harry in the middle of the night without anyone suspecting them at first.
Hermione would be a likely candidate. She's always been there for Harry and is very empathetic. She would probably offer him some words of wisdom and a shoulder to cry on.
Severus Snape is another character who could be considered a potions genius in fanfic. In the official story, he was a master of potions. Fanfic writers might explore more of his early days as a potions prodigy or create scenarios where he imparts his deep knowledge of potions to other characters in unique ways.
Maybe it's a result of a dangerous magical experiment gone wrong. Harry might be trying to test a new spell or a new form of magic that he read about in some old, mysterious book. But he doesn't fully understand it, and it backfires on him, leaving him badly injured.
It could be Death Eaters. They might have finally found a way to capture Harry without alerting Dumbledore. His 16th birthday could be the perfect opportunity as everyone might be a bit more relaxed thinking he's not quite of age yet for the full - on final battle.
There's also a possibility that it was an accident. Maybe Harry was exploring some ancient and dangerous magic, and something went wrong. A spell backfired and instead of achieving what he intended, it put a strain on his heart and led to the heart attack.
It could be a rogue Death Eater who managed to catch Harry off - guard. Maybe they were lying in wait and launched a surprise attack when Harry was alone, away from the safety of Hogwarts.
It could be Dumbledore. If he is too focused on his grand plans against Voldemort, he might overlook Harry's well - being and needs, which could lead to Harry's death from neglect.
Hermione would most likely be the first to help. She's always been there for Harry and is very knowledgeable in potions. She might quickly assess the situation and try to find a counter - potion or spell to revive him.