Super Mario World alone did more to push the platformer genre forward than any Sonic game. I'm not even going to bring Yoshi's Island into this because that's just not fair.
The original Sonic on the other hand wasn't really that good. The foundation was there it just took Sonic 2 to make something interesting out of it, in part thanks to the addition of the spin dash and some cool level design (even if there are some parts that are just smurfing bulltrout). But after that most of the additions just got in the way of the main gameplay rather than adding to it. Knuckles was kind of cool since his climbing and gliding brought something really different compared to Sonic as opposed to simply flying short distances like Tails. But was it as ground breaking as the stuff Mario did at the time? Not even close to be honest. The games were mostly still Sonic 2 with a fresh coat of paint and some annoying new game mechanics. Now sure, Sonic 2 with a fresh coat of paint is still fun, even if they were a bit flawed, but they're none of them are a Mario World.