Contrary to older information, the 2002 PC game Harry Potter and the Chamber of Secrets is legally purchasable and downloadable today:
Both versions include the original game with compatibility patches. No emulation or unofficial sources are needed.
Note: The console versions (PS2, Xbox, GameCube) are not on these platforms; physical copies or console backward compatibility are required for those.