I really dislike when I see people say that King Viserys had no right to change the laws and traditions of Westeros by making Rhaenyra his heir. They really have no idea what they're talking about when they say that. Rulers - kings and queens - create and change laws and traditions. If King Jaehaerys could officially set the precedent of sons coming before daughters then King Viserys had the right to undo it.
It's not even like it was the first time a Targaryen had changed any traditions in Westeros. The Conquerors came along, took over the land, and made multiple changes, such as outlawing certain Westerosi traditions such as making it so men could strike their wives only a certain number of times instead of beating them to death. King Jaehaerys created an entire doctrine allowing Targaryens to continue practicing incest even though that was against the tradition in Westeros. Queen Alysanne abolished The First Night, an ancient tradition in Westeros. I truly have no idea where this notion comes from that Viserys had no right to change anything. He was the most powerful man in Westeros, what do you mean he had no right? If he wanted to shake up tradition then that was his right to do so as king.
Just take a look at real life historical kings and queens, emperors, etc. Many of them changed things that previous rulers had implemented, they changed laws and traditions that existed for a long time. I mean King Henry VIII established a whole new church just so he could get a divorce and did many things to diminish the Catholic Church's influence because he was king, he could do that. Then his daughter Queen Mary came along and tried to undo what her father did and then Queen Elizabeth I came after her and reversed her reforms because kings and queens could change whatever they wanted and undo whatever they wanted.
So yeah King Viserys was well within his right to decide to make his daughter heir over his son. He was well within his right as king to change a precedent a previous king had set.
I don't know if people who say he had no right to do what he did are just used to most monarchies today being only symbolic in nature with not much power or what but most monarchies in history could do and change what they wanted because they had absolute power. House Targaryen had absolute power, meaning King Viserys could do what he wanted and if what he wanted was to make Rhaenyra his heir then he could do that. I've seen people argue that his word isn't law but yes it is.