It could be Nagini. Even though in the original series she was more of a servant to Voldemort, in the fanfiction, she could have a different personality and form a bond with Harry.
There could be many interesting fanfictions involving Harry Potter and a snake. Maybe the snake is a magical creature with special powers that helps Harry in his adventures. For example, it could lead him to hidden secrets or protect him from dark wizards.
One possible plot line could be that the snake helps Harry in his battles against the Dark Arts. For example, it could use its unique abilities to sense danger and warn Harry in advance.
It could also be a snake from the Forbidden Forest. There are many unknown and mysterious creatures in there. A snake from that forest might be more in tune with the natural magic of Hogwarts. Harry, being the curious and kind - hearted person he is, might come across it during one of his adventures in the forest and start a friendship with it.
Maybe it's an anonymous gift from someone who has been observing Harry. This person could be a former student of Hogwarts who has a special connection to snakes and sees that Harry has a kind heart and would take good care of the snake. So they leave the snake for Harry to find with a simple note that just says 'For Harry Potter'.
The snake's help could represent an unexpected alliance. In the Harry Potter series, snakes are often seen as symbols of Slytherin, which is usually at odds with Harry. So it's significant as it breaks the stereotype of enmity between Gryffindor (represented by Harry) and Slytherin.
The snake might use its ability to move stealthily. It could spy on the enemies for Harry Potter. For example, it can slither into hidden places where humans can't easily reach and gather important information.
Snake magic in Harry Potter fanfiction can be used to show a character's dark side. Since snakes are often associated with Slytherin and dark magic in the original series, in fanfiction, a character using snake magic might be on a path towards the dark arts. For example, they could use snake magic to control others or gain power in a more underhanded way.
His friends might be a bit worried at first. Hermione, for sure, would be concerned about the potential danger of having a snake around. Ron might be a bit scared too, considering his fear of spiders and general uneasiness around things that seem a bit dark. But if the snake turns out to be helpful, they might come around.
Well, in some fanfictions, he might find it in the Forbidden Forest during one of his adventures. Maybe it was injured and he felt a connection to it, so he decided to take it as a pet.