Losing a game's CD key can be frustrating, but there are legitimate ways to recover it before anything else. Start by checking the game's original packaging, the manual, or the disc case, since the key is often printed there.
If you registered the game online or bought it digitally, the key may be stored in your account's order history or confirmation email. Many storefronts keep a record you can retrieve at any time.
I'd steer clear of key generators and similar tools, since they're commonly associated with piracy and can carry security risks. Reaching out to the game's official support with proof of purchase is the safest path back to your key.