The Yuan Dynasty ruled China by building a complex bureaucracy. This administrative system allowed them to effectively govern the vast territory they controlled. The bureaucracy consisted of various levels of government officials who managed different aspects of governance, such as taxation, law enforcement, administration, and more. This system helped the Yuan Dynasty maintain control over their empire and enact policies across different regions and populations. It's worth noting that while bureaucracy played a significant role, other factors also contributed to the Yuan Dynasty's rule in China.