Seems its done automatically
Steam and AppStore
For versions purchased from Steam, or from the Apple AppStore, these editions will be registered into your account the first time that Trainz successfully logs in after entering your MyTrainz account's username and password into the Trainz Settings