Review the email sent to you after your purchase; serial numbers (e.g., starting with "ATS9" for older versions like TS2009) are often included there.
Most Steam versions do not come with a separate serial number. Authorization happens automatically when you link your Steam account to your MyTrainz account through the game's settings. Activation Steps
If you have a version that specifically asks for a serial number, you can find it using these methods: