Game of Thrones had a lot to wrap up in its final season, not just from its decade-long run, but for fans of the novels who are still waiting for the release of The Winds of Winter and A Dream Of Spring. The latter has a lot more to it in questions than the TV series, due to prophecies running around, most of which the TV show cut. Even so, the series hinted at the Valonqar and the Prince That Was Promised. Also, the Game Of Thrones finale revealed the "dragon has three heads," though it might have escaped fans notice the first time around.
The thing about prophecies in Westeros, is they don't work out the way anyone ever expects. Everyone figured the Valonqar wrapping "hands around [Cersei's] lily white throat" was either Tyrion or Jaime strangling her in a crime of passion. Instead, it was both who led her to her death, trying to help her escape, and Jaime's hands around her throat were to cup her head close and protect her from the roof caving in. As for the Prince That Was Promised, Arya is an excellent choice, but it's a convoluted answer to a long game riddle of who would be born because of Aerys marrying Rhaella.
Like the Valonqar, the show never mentioned the line "the dragon has three heads," one of the many visions Daenerys has in the House of the Undying which never made it on screen. But squint and look closer, and the answer is actually pretty astounding.
Like the Valonqar, and the Prince That Was Promised, fans took this prophecy straightforwardly. Valonqar wraps his hands around a throat? Must be strangulation. PtwP comes from Aerys and Rhaella marrying? Must be one of their children or grandchildren. The dragon has three heads? Well, Daenerys has three dragons, so clearly there must be three riders. This led to all sorts of theories, from Tyrion being a secret Targaryen to Bran warging into the third dragon.
But all those were wrong. The third dragon was killed, resurrected and flown by the Night King. There was no extra secret Targaryen to add to Jon and Daenerys. The dragon never had three heads this way.
But like the other two prophecies, this was all far too literal an interpretation. Instead, look at how Westeros ended: With three rulers.
The scene in the House of the Undying features Rhaegar standing over the birth of his son Aegon, and then turning to Daenerys, looking right at her and saying "There must be one more... the dragon has three heads."
The reader assumes "one more" means this baby, Daenerys, and one other person. But there's no reason to believe these words apply to Daenerys, other than the belief she is to rule Westeros. Once that's gone, the field opens up, and surprisingly, three rulers appear.
As the show ends, Jon Snow, aka Aegon, leads the wildlings north, to rule beyond the Wall. Bran Stark is elected ruler of the Six Kingdoms to the south. In between — the "one more" — as the North gains independence, ruled by Sansa Stark.
The dragon indeed has three heads in Westeros. And their names are Stark.