Sonic's upgrade items are hidden around his stages, and most require specific equipment to reach.
City Escape — underneath the metal boxes. You need the Flame Ring and the Bounce Bracelet; bounce on the boxes and they break.
Metal Harbor — right at the start, since you need it to finish the level anyway.
Green Forest — head to the treehouse area, and before descending the vine at the top, turn around and go to the cliff. Jump and homing attack the chain of robots to land on the island.
Pyramid Cave — just bounce; you find it along the normal route.
Final Rush — the Mystic Melody, though the method for that one is not well documented.
Collecting the upgrades is what unlocks the full set of level entrances in the kart-style stage select, so it is worth the detours.