Both are faster than light, but Goku's destructive output far exceeds anything in Sonic's universe.
Sonic is fast โ potentially as fast as Goku in pure straight-line speed. The Speed Force equivalent in Sonic's universe lets him approach and exceed lightspeed, and Super Sonic (powered by Chaos Emeralds) adds invulnerability and flight.
But speed alone doesn't win fights. Goku's attack potency operates at the universal scale โ his Kamehameha can threaten dimensions. Sonic's offensive capabilities, even in Super Sonic form, are significantly more modest. He defeats robots and monsters, not universe-busters.
Super Sonic is the equalizer โ it provides invulnerability and massive power amplification. But it's time-limited (rings run out) and has been overwhelmed by sufficient force in Sonic lore. Goku's sustained output would likely drain Super Sonic's ring supply, after which base Sonic lacks the durability to survive universal-level attacks.
Goku's destructive output is universal-scale. Ultra Instinct provides autonomous combat beyond conscious reaction. Even if Sonic matches Goku's speed, Goku's power, durability, and combat skill are all vastly superior in non-Super form.
Sonic's speed is comparable to Goku's, and Super Sonic provides invulnerability and amplified power. Sonic's Chaos Emerald abilities include time manipulation and dimensional travel. In the comics, Super Sonic has feats approaching multiversal levels.
Goku wins in most scenarios. Sonic's speed keeps him competitive in the early exchanges, but once Super Sonic's ring supply runs out, the power gap becomes insurmountable. Goku's sustained combat power at universal levels exceeds what the Sonic franchise has demonstrated.
Goku also fights
Sonic the Hedgehog also fights