Honestly they're not that different of games, its just the content and presentation that are different.
For Phantom Hourglass its the obvious boating part, and ST its the train. The train is more more simple and you cant do as much with it as the boat. Both of the vehicles have cannons, but the boat can salvage and you can go fishing.
Then there's the minigames and in world interaction. Phantom Hourglass had about one? or two more minigames than Spirit Tracks. Phantom Hourglass also had more in world interaction though, like I mentioned earlier, the island you had to map yourself, or the sea of fog that you had to do a certain route to get through. Spirit Tracks had much less of this kind of interaction.
Phantom Hourglass had more dungeons than Spirit Tracks as well, and the names of the dungeon were a bit better in general. (Spirit Tracks dungeons are literally called like "Fire Temple" as compared to "Temple of Courage", its not much but it shows more effort.)
Spirit Tracks did have "new items" though, while some were interesting, some were just bad.
There's more I can comment on, but I'm already bored kek.