Here's the process, but note you MUST defeat enough Cogs first so the Cog Gallery turns fully orange:
1. Defeat the Chief Justice to earn a Cog Summon.
2. Open your Shticker Book.
3. Go to the Cog Gallery.
4. You'll see a circle next to the Cog.
5. Click that circle.
6. Choose from Summon Cog, Summon Invasion, or Summon Building.
7. Pick Summon Building, but make sure you're standing on a street in front of a Toon building.
8. You'll hear the Cog building slam down, and you're done!