A kind stranger could come to his aid. Maybe someone who has been through a similar situation in the past. This person could offer practical advice on how to survive while being on the run and pregnant. They might also teach Stiles some skills like cooking healthy meals for the baby's sake.
One possibility could be that Stiles runs away because he's afraid of the reactions from his friends and family. Maybe he thinks they'll be disappointed or angry. He might go to a place where no one knows him to start a new life for himself and his unborn child.
Another character he could interact with is Thor. Thor's otherworldly nature and his powerful abilities would be quite a contrast to Stiles. Maybe Stiles could help Thor understand some earthly concepts while Thor could teach Stiles about Asgardian culture and power.
It could be his love interest, like I mentioned before, Lydia. She might reject him because she's too focused on her own goals or perhaps she doesn't see Stiles in that way at the time. Their relationship has always been a bit complex in the show, so this would be a likely scenario in fanfiction.
His best friend could discover it. Since they are so close, they might notice something different about Stiles that makes them suspect he's actually a girl.
It could be Ron. Maybe they had a falling out or some sort of misunderstanding during their relationship, and Hermione runs away when she discovers she's pregnant. Another possibility is that it's a new character, someone she met during one of her adventures or studies. This new character could be from a different magical culture, and their relationship was a secret.
A great storyline in the Stiles and Malia pregnant fanfiction could be centered around their journey to acceptance. At first, they might be in shock when they find out about the pregnancy. Malia, not being fully used to human emotions and family concepts, could have a hard time understanding what it all means. Stiles might also be scared but tries to be strong for her. As time goes by, they slowly come to terms with it. They might attend parenting classes together, where they meet other expectant parents and learn a lot. And throughout the pregnancy, they could discover new things about each other and their love for one another grows even deeper.
Stiles would probably handle it with his usual sarcasm at first. He might make jokes about his situation to ease the tension. But as the pregnancy progresses, he would become more serious. He'd likely rely on his friends for support, asking for advice on things like dealing with morning sickness.
Sasuke could be one of the people to help. Despite their past differences, Sasuke has a deep connection with Naruto. He might be able to understand Naruto's situation and offer his protection and support.
The Weasley family could also be of great help. Molly Weasley, in particular, has a motherly instinct. She could take Harry in and help him with the pregnancy as if he were one of her own children. The Weasley twins might also be able to create some useful magical items for Harry to use during his time away, like special potions for a healthy pregnancy or charms to keep him hidden. And Ron, as Harry's best friend, would be there to support him emotionally and physically, even if he was initially shocked by the situation.
It could be a rogue werewolf. Maybe this werewolf has a grudge against Stiles' pack and thinks that by kidnapping Stiles, he can get some sort of revenge or leverage.