In House of the Dragon Episode 1, King Viserys I Targaryen had to decide the matter of succession after the death of his wife Aemma and their infant son Baelon. The choice would be between his daughter Rhaenyra and his brother Daemon and Viserys ultimately chose the princess, who would then set to be the first female ruler of Westeros.
The decision wasn’t a huge surprise but the tradition that came after naming the heir was certainly massive. Viserys took Rhaenyra to the Red Keep where he tells his daughter about Aegon the Conqueror’s reason for conquering then uniting the seven kingdoms. As it turns out, Aegon had a vision of the fall of man and need to ensure that Westeros was united when the Long Night finally came.
Viserys declares that the only way for the world of men to survive is if a Targaryen is seated on the Iron Throne. Although Game of Thrones didn’t show either Jon Snow or Daenerys Targaryen as the ruler of Westeros, they were the ones who led the Battle of Winterfell, uniting several kingdoms in the fight against the White Walkers.
A Targaryen on the Iron Throne is not what we saw in the final season of Game of Thrones but that doesn’t mean it won’t happen. There’s a huge possibility that either Jon or Dany will rule the Seven Kingdoms in George R.R. Martin’s A Song of Ice and Fire book series.