This is tricky question for me because while both games came out around the same time, (at least I think) they belong to two separate eras and styles.
Where Super Mario World beats Sonic the Hedgehog is that it's a more robust game with a lineage of practices and traditions carried down from previous games. But I also see that as a weakness for SMW because (again, at least for me) it was post-climactic, as it followed the megaton impact of Super Mario Bros 3 - which is the first "hyped-to-the-moon" game I can remember in my lifetime. Think of SMB3 as the Ocarina of Time or Breath of the Wild of its day, and Mario World is something more like Celda, well regarded, but not nearly as hyped or impactful as the other two.
Sonic 1's weakness... it's a bit bare bones. Its strength is the other side of the coin to Mario World's in that it doesn't rely on tried and true methods, but goes for a much fresher feeling approach. The sprites are bigger, the levels are bigger, freer, and platforming feels a lot more slick and connected.
Overall, Super Mario World was one of the top games of an era that was coming to a close, while Sonic 1 was the crack of dawn on a new era. If there was a "Both are great" or "Can't decide" option, that's what I'd pick.
To follow up, the era of Sonic 1 got a lot better. I think Sonic 2 was a spectacularly well done follow-up that maintained the freshness while feeling like a much more robust experience. The DKC trilogy is, in my opinion (and I don't think this is a controversial one), where the 16-bit style platforming game peaked. I think Kirby Superstar came out a couple of years to late, but that game was also fantastic, and did a lot of fresh things.
I describe myself as a little dose of toxic masculinity.







