Okay, so you want to write 'Sonic' fanfiction with your own characters? I've tried it and gotten some decent feedback, so maybe my blunders can help. The biggest trap is making your OC a Sonic clone or, worse, a silent observer who just follows the main cast around. Sonic's world is huge—think about the zones, the strange tech, the magic, the alien stuff from the Starfall Islands. Your OC needs a reason to be there that isn't just 'I'm a cool hedgehog too.' Maybe they're a historian from a forgotten Echidna clan digging up ruins, or a mechanic in Spagonia who accidentally reverse-engineers a badnik and gets targeted by Eggman. Give them a specific skill that interacts with the world's rules, not just super speed.
What really makes it click for me is friction. The Sonic cast has strong personalities. Throw your careful, methodical inventor OC at Knuckles, who's all blunt force and duty, and see how they clash before they maybe work together. Or have your character's cynical view of heroism annoy Sonic's boundless optimism. Conflict drives stories. Also, don't feel you have to use every canon character. Pick one or two to highlight, let your OC build a dynamic with them, and let the rest be background. It keeps the focus tight. I once wrote about a parkour courier in New Central City who got caught up in a Chaos Emerald heist; she mostly interacted with Rouge and Omega, and it felt way more natural than forcing a scene with everyone.
The tone's important too. You can go full adventure-saturday-morning-cartoon, or you can lean into the deeper lore from the games like 'Sonic Frontiers'. My current fic is actually a bit of a mystery thriller set in one of the cyberspace levels, with my OC trying to figure out why the digital landscape is glitching. It’s less about racing and more about puzzle-solving, but it still feels like Sonic because the aesthetic and the core themes—friendship, freedom, facing the unknown—are all there. Just start small, give your character a clear want and a flaw, and drop them into a corner of that world that sparks your interest.