Depends on the car. Some cars have a key number. A new key can be cut using the numbers.
They can make a key basd on your VIN but only the dealers do it. They charge about $25 last call. If you could get the code you could probably save.
Take your registration or other proof of ownership to a dealer and get a new key made.