Warning: Spoilers for The Wheel of Time season 3, episode 6
Finally, Thom Merrilin has made his long-awaited return to Robert Jordan's Wheel of Time books, there's good reason to hope his stay will last longer than his first stint on the show. Thom is without question one of Rand and Mat's most valuable allies.
Thom originally exited the story when he fought a Fade, buying time for Rand and Mat to escape in season 1. He made a reference to the fight in season 3's "Shadow of the Night," briefly chastizing Mat for leaving him behind. Exactly what happened to him after that hasn't been discussed in depth, but the aftermath of the fight - as laid out by the source material - was seemingly acknowledged by Thom to have occurred in the show as well. As Thom noted in the episode, there was a "cost" to the help he provided in season 1.
Thom Was Badly Injured Fighting The Fade
The Fade Seriously Wounded Thom When He Was Trying To Save Mat And Rand
During his reunion scene with Mat in "Shadow of the Night," Thom mentioned the "cost" of helping Rand and Mat the last time he encountered them. This appears to be a reference to the injury that Thom sustained fighting the Fade in The Wheel of Time book series. When Thom returned in book 2, The Great Hunt, it was revealed that he was badly injured during the battle with the Fade at Whitebridge in The Eye of the World. As he explained to Rand when they saw each other again, he recovered from the wound but now suffers from a limp.

Wheel Of Time Season 3's New Secret Channeler Is Way Stronger Than You Think
The Wheel of Time season 3 just introduced a new channeler, and she's way more of a powerhouse than many TV audiences will have expected.
As for how he survived at all, Thom noted in The Great Hunt that since he wasn't the Fade's target in the first place, it just incapacitated him and moved on with its hunt for Rand and the other ta'veren. Given the similarity in the circumstances, it can be assumed that the same was true for the TV version of Thom when he battled the Fade in season 1. In regards to his injury, Willaume's Thom doesn't have a visible limp, but his comments indicate that he did indeed suffer some sort of serious injury in his efforts to hold off the Fade.
Where Thom Went After Fighting The Fade In The Books
Thom Traveled To Cairhein, Tear, And Caemlyn
The Wheel of Time didn't follow Thom's exploits immediately after the Whitebridge incident, but both The Great Hunt and The Dragon Reborn shed light on his activities. Sometime after his injury, Thom found his way to Cairhein during the timeframe of Rand's visit in The Great Hunt. It was here, and not in Tanchico, that the series confirmed Thom survived the battle with the Fade. While there, he assassinated Galldrian, the king of Cairhein. Galldrian exists in the canon of the show, but whether or not Thom killed him is not known.
Thom next emerged in Caemlyn where he had an encounter with Mat. The books used this story to lay out Thom's connection to Queen Morgase Trakand and past role as a bard in her court, which was touched upon in "Shadow of the Night." Mat and Thom enjoyed some travels together before winding up in Tear along with everyone else at the end of The Dragon Reborn, where Rand claimed Callandor from the Stone of Tear.
Out of 14 books, there are only two - A Crown Swords and The Path of Daggers - that don't feature Thom Merrilin in any capacity.
This particular event obviously preceded the Tanchico plotline, but that doesn't meant it won't happen in the TV series. Rand claiming Callandor at the Stone of Tear has seemingly been moved and not cut, so Mat and Thom could theoretically appear in the Tear storyline later on. After all, the need for Rand to reach Tear eventually has been acknowledged in-universe on multiple occasions.
Why Thom Wasn't In The Wheel Of Time Season 2
Thom Was In The Story Season 2 Adapted, But Wasn't Crucial
Not unlike the TV character, Thom Merrilin disappeared for some time after the Fade fight in Whitebridge. However, his absence was much shorter, considering that Thom did indeed return in the following book. His TV counterpart, on the other hand, skipped Prime Video's adaptation of The Great Hunt altogether. It would appear that scheduling conflicts stood in the way, as Willaume was filming scenes for Netflix's 1899 series when Wheel of Time season 2 was in production.

Wheel Of Time Season 3 Quietly Sets Up Another Major Ally For The Dragon Reborn
The Wheel of Time season 3 sets up another ally of Rand al'Thor, the Dragon Reborn - and another set of prophecies he will eventually fulfil.
As a result, there was a sizable gap between Thom's appearances. But even though Thom is among Jordan's most important characters in The Wheel of Time, Thom's absence wasn't detrimental to season 2, nor was he a character the narrative needed. After all, Thom's role in The Great Hunt isn't far removed from the presence he had in season 1. He assisted Rand during his short stay in Cairhein, and then left again, without coming back until The Dragon Reborn, a story the show hasn't adapted in any case.
How Thom's Return Is Different From The Books
Instead of Meeting Them There Coincidentally, Thom Went With Them To Tanchico
Because of Thom's lack of involvement in season 2 and the decision to move straight from The Great Hunt's ending to the events of The Shadow Rising, the show had to create its own entrance point for Thom in season 3, rather than pull from the source material. Thom does indeed the fight against the Black Ajah in The Shadow Rising's Tanchico plotline, but was already in the company of Nynaeve and Elayne when that investigation started. At the request of Queen Morgase Trakand, Thom left Tear with the two Accepted (plus Juilin Sandar) and went to Tanchico.
The Wheel of Time has yet to feature Juilin Sandar, one of Nynaeve and Elayne's two main allies in The Shadow Rising, the other being Thom. The main characters in the book version of the story were Nynaeve, Elayne, Thom, and Juilin, and the protagonists of the TV plotline appear to be Nynaeve, Elayne, Mat, Min, and now Thom.
Furthermore, The Shadow Rising featured no reunion between Mat and Thom. Whereas the TV version went with Nynaeve and Elayne to Tanchico, Mat from the books journeyed with Rand to the Aiel Waste. Mat did play a role in Thom, Nynaeve, Juilin Sandar, and Elayne's adventures, but didn't their group until The Wheel of Time's sixth book, Lord of Chaos, when they were in Salidar. Mat and Thom make for one of the books' most enjoyable duos, so this change in the sequence of events could pave the way for some of their best moments to play out on the small screen sooner rather than later.