Rhaenyra is the legitimate heir in a feudal monarchy
My history classes are finally useful lol. Anyway, this is kinda short, simplified and with wikipedia as my main source because honestly I don't feel like getting into a full argument about it as it is just a fictional world and all. But I needed to write this because there is a misunderstanding about how feudal monarchy works (although technically there are some major differences between Westeros and medieval Europe tbh). Also my english kinda sucks sorry.
To be simple: oaths are very VERY important in a feudal monarchy. We see the apparition of feudal monarchies around the 9th century after a few kingdoms' territorial expansions in Europe. The main issue of such large territory is that it required soldiers everywhere to protect it, and these soldiers needed a "leader" to defend the territories the king couldn't protect himself, someone to make sure the new conquered territories would stay under the king's rule. However, to make sure these new "leaders" would stay loyal to the king, they had to pledge an oath to him, thus becoming his vassals. Later, these vassals will themselves have vassals under them that have to swear oaths to them as well. The whole feudal hierarchy mainly existed through oaths as it is based on that the king could give his vassals lands, territories and castles (ect...) to protect.
"The obligations and corresponding rights between lord and vassal concerning the fief form the basis of the feudal relationship.[1]" (https://en.wikipedia.org/wiki/Feudalism)
"Before a lord could grant land (a fief) to someone, he had to make that person a vassal. This was done at a formal and symbolic ceremony called a commendation ceremony, which was composed of the two-part act of homage and oath of fealty. During homage, the lord and vassal entered into a contract in which the vassal promised to fight for the lord at his command, whilst the lord agreed to protect the vassal from external forces. Fealty comes from the Latin fidelitas and denotes the fidelity owed by a vassal to his feudal lord. "Fealty" also refers to an oath that more explicitly reinforces the commitments of the vassal made during homage; such an oath follows homage.[35] Once the commendation ceremony was complete, the lord and vassal were in a feudal relationship with agreed obligations to one another. The vassal's principal obligation to the lord was to provide aid or military service." (Source: https://en.wikipedia.org/wiki/Feudalism#:~:text=Classic%20feudalism,-See%20also%3A%20Feudalism&text=In%20broad%20terms%20a%20lord,of%20service%20to%20the%20lord.)
"It was sworn between two people, the feudal subject or liegeman (vassal) and his feudal superior (liege lord). The oath of allegiance was usually carried out as part of a traditional ceremony in which the liegeman or vassal gave his lord a pledge of loyalty and acceptance of the consequences of a breach of trust. In return, the liege lord promised to protect and remain loyal to his vassal." (https://en.wikipedia.org/wiki/Fealty)
"The oath also specifies that this same oath to the king, is equally sworn to his "heirs and successors", in the plural, rather than a single heir and successor (...) in the event that any one of them should accede to the throne. Thus, the pledge of loyalty to the Crown made in the oath does not end at the death of the current monarch. (...) The oath of allegiance was performed to King Edgar (c. 944–8 July 975).[4] The oath was certainly in use as of the date of John, King of England's Magna Carta, signed on 15 June 1215." (https://en.wikipedia.org/wiki/Oath_of_Allegiance_(United_Kingdom))
"Disregarding the precedents set by King Jaehaerys in 92 and the Great Council in 101, Viserys declared his daughter, Rhaenyra, to be his rightful heir, and named her Princess of Dragonstone. In a lavish ceremony at King’s Landing, hundreds of lords did obeisance to the Realm’s Delight as she sat at her father’s feet at the base of the Iron Throne, swearing to honor and defend her right of succession." (page 393).
"The ancient master of coin, who had served King Viserys for the majority of his reign, and his grandfather, Jaehaerys the Old King, before him, reminded the council that Rhaenyra was older than her brothers and had more Targaryen blood, that the late king had chosen her as his successor, that he had repeatedly refused to alter the succession despite the pleadings of Queen Alicent and her greens, that hundreds of lords and landed knights had done obeisance to the princess in 105 AC, and sworn solemn oaths to defend her rights." (page 430).
These are the same kind of vows the Kingsguard swear:
"Then as now, the Sworn Brotherhood of the Kingsguard consisted of seven knights, men of proven loyalty and undoubted prowess who had taken solemn oaths to devote their lives to defending the king’s person and kin." (page 428).
The "solemn oaths" term is used in both cases for Rhaenyra's inheritance and Kingsguard's vows, which is very interesting.
Anyway, it is mentioned two times the lords and landed knights swore an oath to her. From a feudal perspective, Rhaenyra is a legitimate heir. For people who want to say "oh but Tyland said he had swore no such oaths!" 1) oaths like that are supposed to be on behalf of your house and doesn’t cease to exist if your king dies, 2) technically Tyland is only the brother of the Lord of Casterly Rock anyway so it makes sense it’s not up to him to swear the oath in a feudal monarchy, though it still applies to him.
Anyway, in a feudal monarchy the king is powerful but he doesn't even have all powers… so he does need the vassals' approval. In Fire and Blood, all the lords who are vassals to the king Viserys I swore an oath to Rhaenyra and recognised her as heir. She is legitimate.