Answer
The Tang Dynasty's decline under Xuanzong was primarily attributed to political missteps. Despite Xuanzong's initial successes and prosperity during the Kaiyuan era, his reign was marked by increasing corruption and nepotism. The appointment of incompetent officials, such as Yang Guozhong, led to poor decision-making and the decline of the military's strength. Additionally, Xuanzong's excessive trust in the eunuchs granted them significant power and influence, eventually contributing to the dynasty's downfall.