1959 (train spotter attested from 1958), chiefly British English, in reference to the hobby of recording the numbers of railway locomotives one has observed; from train (n.) in the railroad sense + verbal noun from spot (v.).
early 14c., "a drawing out, delay;" late 14c., "trailing part of a skirt, gown, or cloak;" also "retinue, procession," from Old French train "tracks, path, trail (of a robe or gown); act of dragging," from trainer "to pull, drag, draw," from Vulgar Latin *traginare, extended from *tragere "to pull," back-formation from tractus, past participle of Latin trahere "to pull, draw" (see tract (n.1)).,
General sense of "series, progression, succession, continuous course" is from late 15c.; train of thought is attested from 1650s. The railroad sense "locomotive and the cars coupled to it" is recorded from 1820 (publication year, dated 1816), from the notion of a "trailing succession" of wagons or carriages pulled by a mechanical engine.
mid-13c., "to mark or stain with spots;" late 14c. as "to stain, sully, tarnish," from spot (n.). Meaning "to see and recognize," is from 1718, originally colloquial and applied to a criminal or suspected person; the general sense is from 1860. Related: Spotted; spotting. Spotted dick "suet pudding with currants and raisins" is attested from 1849.
Others are reading
<a href="https://www.etymonline.com/word/train-spotting">Etymology of train-spotting by etymonline</a>
Harper, D. (n.d.). Etymology of train-spotting. Online Etymology Dictionary. Retrieved $(datetime), from https://www.etymonline.com/word/train-spotting