Dedicated cheat databases are the traditional answer, and CheatCodes.com is one of the largest, covering PlayStation, Xbox, Wii, PC, Nintendo DS, PSP, GameCube, Game Boy, Nintendo 64 and Dreamcast among others. Alongside it sit long-running sites such as GameFAQs, IGN's guides, and Neoseeker, which host codes, walkthroughs and strategy in one place.
Search by the exact title plus "cheats" or "codes" and prefer results from those established names. They are text databases, not download sites, which is precisely what makes them safer.
Be sceptical of anything that asks you to install a program, complete a survey, or disable your antivirus to "unlock" cheats. That is the malware pattern, and it has nothing to do with the game you were looking up. For online multiplayer titles, remember that cheats violate the terms of service and will get an account banned.