The straightforward answer is that you don't. Legitimate serial numbers come with a purchased copy of the game.
If you want to play a PC game properly and support the developers, buying it is the reliable and legal way to get a valid key.