Caesar 3 is no longer supported by the company who now owns the rights – Activision.
If you buy a used physical copy of the game from eBay, Amazon, etc, you have to be sure to get the code.
However, the game is currently digitally distributed by GOG – a very popular DRM-free service who have the rights to legally distribute a lot of old games – so if you purchase it from GOG, you won’t need a code:
https://www.gog.com/game/caesar_3?pp=a0e3eab3c80118379cb2e1d7b163f82494430e03