The ending of The War of the Rohirrim closes Wulf's war and quietly sets up the world that the later stories inherit. Wulf is dead, the Dunlending army scatters and the siege ends. Fréaláf becomes king of Rohan, and the fortress is renamed Helm's Deep in memory of Helm, which is how the legend of the fallen king becomes a place name. The earlier scene matters here: Helm dies covering Héra's escape and is remembered as a ghostly figure who haunts the enemy, and the horn and armor that scare the Dunlendings into retreat are what turn a dead king into a story people keep telling.
What does Saruman's role mean? Saruman keeps Isengard and offers friendship to the new king. In my opinion, that is the most pointed moment of the film for anyone who has seen the trilogy, because Saruman was the villain Christopher Lee played in fellowship of the ring and the two towers, and his later history gives the offer an uneasy edge. It could be argued that the film leaves this deliberately open, since it shows only the offer and never its consequences. That restraint is typical of how this saga handles its wizards: the trilogy also lets the audience read more into Saruman than any single scene states.
The final scene follows Héra. She leaves with Olwyn to find adventure and meets Gandalf, who tells her about orcs hunting for rings. This points toward the events of Tolkien's later stories, including the quest around the one ring that the hobbit an unexpected journey and the trilogy go on to tell. Perhaps the clearest reading is that Héra's story ends where the main saga begins to gather pace, with the Rohirrim's war settled and a larger search just starting. Warner Bros. places the film 183 years before the trilogy, so the Gandalf meeting is a signpost rather than a direct link to Bilbo's story.
There is a useful comparison with the frame of the trilogy. Miranda Otto played Éowyn in the Jackson films, and here she narrates a tale from her own people's past, so the whole film is a story told within the world. That framing explains why the ending favors legend over detail, and why a renamed fortress counts as the epilogue. Stephen Gallagher's score also reuses Howard Shore's Rohan theme, which means the closing scenes sound like the same Rohan the trilogy later shows. The production context supports this reading: the film was made with motion capture and hand drawn 2D animation, and Peter Jackson and Fran Walsh stayed on as executive producers, so it was built to feel continuous with the live action films.
As such, the Gandalf meeting works as a bridge to the lord of the rings timeline.