The piece was created by a pseudonymous Texas-based animator, Something Wicked, who uses the Twitter handle @Som3thingwicked. There is no indication that the Trump campaign commissioned this piece of animation or that the animator was compensated by the Trump campaign for use of their work.
The animation was first released on Youtube back on December 5, 2019 with the title A Tale of Two Trains. See the higher resolution version here. At the time of its initial release, there were still over a dozen candidates in the race to become the Democratic candidate in 2020.
Whether intentional or not, the piece recalls the (much-better-conceived-and-animated) 1944 propaganda short Hell-Bent for Election, in which U.S. presidential candidates Franklin Roosevelt and Thomas Dewey were depicted as trains, one as a fast streamlined freight train and the other as a worn-out smoke-spewing locomotive.