He might find it in a hidden chamber in Hogwarts. Maybe it was left there by a powerful wizard from long ago who had some connection to other universes.
The plot might involve Harry accidentally stumbling upon the Infinity Gauntlet in the Room of Requirement. As he tries to figure out what it is, he discovers its immense power. However, the Ministry of Magic wants to use it for their own gain. Harry has to decide whether to keep it safe from the Ministry or use it himself to finally defeat all the dark forces that still lurk in the wizarding world.
He would probably become extremely powerful. He could use the Infinity Stones' powers to defeat Voldemort in an instant. For example, the Power Stone could enhance his magic to an unimaginable level, and the Time Stone might allow him to go back and prevent bad things from happening in the wizarding world.
He could gain the power to control time, which would be really useful in the wizarding world. He could go back and prevent some of the bad things that happened, like the death of his parents.
Dumbledore. He has the wisdom and experience to handle the immense power of the Infinity Gauntlet. He could use it to restore balance in the wizarding world in ways that others might not think of. For example, he could use it to heal the long - standing divides between different wizarding communities, like the pure - bloods and the Muggle - borns, in a more permanent way.
In a Batman Infinity Gauntlet fanfiction, Batman would face a moral dilemma. The power of the gauntlet is immense and corrupting. He would have to struggle with whether to use it for what he believes is the greater good or to resist its allure completely. He could also encounter other powerful beings from the DC universe who either want to take the gauntlet from him or help him control its power.
Well, if Naruto had the Infinity Gauntlet, the story would change drastically. First, he could easily defeat his enemies like Madara or Kaguya with just a snap. No more long and arduous battles. Second, the power dynamic in the ninja world would be completely shifted. Naruto might use the gauntlet to bring true peace, not just the temporary peace they had before. He could potentially reshape the world according to his ideals without having to convince others through his usual means of talk and fight. Third, his friends might view him differently, perhaps with a bit of fear or awe. But Naruto being Naruto, he would still try to use the power in a positive way, but it would be a whole new ball game in the Naruto universe.
If Spider - Man has the Infinity Gauntlet in fanfiction, he would likely use it to protect his loved ones first. He could use the Soul Stone to ensure the safety of Mary Jane, Ned, and Aunt May. His approach to using the gauntlet would probably be different from someone like Thanos. Spider - Man is all about protecting the little guy, so he'd focus on using the power for the benefit of ordinary people. He might even use the Stones to improve living conditions in the city, like using the Power Stone to generate clean energy for everyone.
In this fanfiction, his biggest threat could be Sasuke. Sasuke has always been Naruto's rival and he might see Naruto with the Infinity Gauntlet as a threat to his own goals. He could try to take the gauntlet from Naruto to either use it for his own means or to stop Naruto from misusing it. Another potential threat could be Orochimaru. He is always after power and the gauntlet's power would be too tempting for him to resist. He would surely plot to steal it from Naruto.