The yellow egg in Sonic Adventure 2 is tied to your progress, and the key is emblems.
As you collect emblems throughout the game, you'll unlock various rewards, and the yellow egg is among the things you earn this way. So keep gathering those emblems and it will come your way.