Since you mentioned you were only collecting English Gastly cards, I hadn’t mentioned the different codes of the Japanese Flight of Legends set. I was indeed aware of them, but thanks for the heads up nonetheless. A lot of the EX era sets have different codes. Here an overview of which sets are released in which languages, where I also mention which EX-era sets have multiple codes available: Sets and Languages: Compilation overview list.
Here also an Excel with all the different codes in English: Pokemon TCG ex Serial Codes - Google Sheets and Japanese/Korean: Pokemon TCG ex Serial Codes - Japanese - Google Sheets (taken from this thread: Complete List of ex Era Serial Code Numbers - #21 by tonysandlin).
The exact purpose of these codes have always been a mystery, and even more so why there are different codes for certain cards. The only thing we know about those codes are, to quote myself from an earlier thread:
Greetz,
Quuador