An interesting way would be to introduce a magical creature into the detention scenario. Say, a mischievous imp that has been causing chaos in the dungeon where the detention is taking place. Harry and Snape have to put aside their differences and work together to capture it. This not only adds an element of adventure but also forces them to interact in a new and unexpected way. You can also play with the dialogue, having Snape make sarcastic remarks and Harry coming up with clever comebacks that slowly chip away at their animosity.
One way to make it interesting is to give the detention a time - travel twist. Maybe a spell goes wrong during the detention and Harry and Snape are sent back in time to when Snape was a student. They have to figure out how to get back to their own time while also dealing with the younger Snape's issues. This would be a great opportunity to explore Snape's backstory more deeply and for Harry to see a different side of his teacher. It could also lead to some comical moments as Harry tries to navigate the Hogwarts of the past.
To make a Harry and Snape detention fanfiction interesting, you can focus on their character development. For example, show Snape's internal struggle between his dislike for Harry based on his past with James and his duty as a teacher. For Harry, explore his growing understanding of the adult world and how Snape fits into it. Also, add some mystery elements like a hidden potion ingredient that they discover during the detention.
One interesting scenario could be that during detention, Snape makes Harry clean all the potion bottles in the dungeon while lecturing him about the importance of precision in potions. Harry, in turn, discovers an old, forgotten potion recipe among the bottles and Snape is grudgingly impressed.
Their relationship can develop as they are forced to spend time together during detention. Harry might start to see Snape's tough exterior as a mask for his insecurities or past traumas. For example, when Snape shares a bit of his knowledge about a difficult potion, Harry realizes Snape is not just out to get him.
Perhaps in the fanfiction, Snape assigns Harry to clean all the old potion vials in the storage room during detention. While doing so, Harry discovers an old diary that seems to hold secrets about Snape's past at Hogwarts, which then leads to a series of revelations and a change in their relationship.
Harry would probably be quite resentful at first. He might think Snape is just being his usual unfair self. So, he would be sulky and do the tasks reluctantly.
It could change in a more positive way. In detention, they might have to rely on each other to get through Snape's tasks. If they are made to work on a complex magical experiment, they would need to communicate. This communication could break down some of the barriers between them. Maybe they start to exchange a few friendly words outside of detention, slowly building a more amicable relationship.
In a Harry and Snape detention fanfiction, Harry might finally have a chance to understand Snape better. He could see that Snape's strictness is not just pure malice but perhaps a result of his complex past. Snape, on the other hand, could start to see Harry not just as James Potter's son, but as an individual with his own struggles. They might end up having a conversation about magic that neither expected, leading to a newfound respect for each other.
Well, Harry could be forced to clean the Potions classroom during detention. Snape might make him scrub every cauldron by hand while muttering about how clumsy Gryffindors are. Harry might accidentally spill a potion ingredient, which makes Snape even angrier and gives him more tasks to do, like sorting out all the potion ingredients in the store cupboard.
Well, perhaps Snape sets them to clean the potions classroom. Draco tries to boss Harry around at first, but Harry refuses to be pushed. As they clean, they accidentally knock over a vial that releases a magical mist. The mist makes them relive some of their worst memories involving each other. This forces them to understand each other's perspectives better and by the end of detention, there's a less hostile air between them.
Another plot could be that Snape assigns the student to clean his office during detention. While cleaning, the student finds old parchments and journals that give insights into Snape's past, especially his time as a student at Hogwarts. The student becomes more empathetic towards Snape after learning about his difficult past and tries to befriend him, which Snape initially resists but gradually warms up to.
Some fanfictions have the idea that while in detention, Harry and Snape are magically bound to work together on a special potion. This potion has the power to reveal hidden secrets. As they work on it, they start to share their own secrets, like Snape's unrequited love for Lily and Harry's fears about Voldemort. It's a really interesting way to develop their relationship.