This gets into pedantic discussions of "what, just what exactly, is a nation?" Which quickly descends into semantics and bonking each other over the head with dictionaries.
Let's take another country as an example to calibrate our parameters: France. France is, technically, 61 years old. The current Fifth French Republic was established in 1958 after the Algiers Crisis, but few would argue that France is a young country. Well then, when was France formed? Was it 1946 when it was last liberated from occupation? Was it 1871 when the last French emperor abdicated? Was it 1789 when France overthrew the Ancien Regime and became a republic for the first time? Or could it be 987, when the area of West Francia was carved out of the Holy Roman Empire? What about the Gauls, were they French?
As you can see, the idea of governmental continuity is a very vague concept which, depending on your definitions, can create a 61 or 1033 year old nation. The 5000 year China relies on similar twisting of words. Most Chinese histories point to the Xia dynasty as the first Chinese nation (2070 BC). The Xia dynasty is semi-mythical and very little evidence exists for their governance. While their most certainly was a group of people who are blood related to the modern Chinese, whether they can be considered the first China is suspect, in the same way Gauls probably weren't French. Xia was followed by the Shang (c. 1600-1000 BC), who had more archaeological evidence, but then again, Gauls had archaeological evidence too.
The Shang were conquered/replaced by the Zhou, who established the first imperial system in China, who first claimed that their rule was blessed with the Heavenly Mandate, an idea that the gods gave a family the good grace to rule, and so long as the emperor acted in good standing, he would maintain this mandate. If he acted inappropriately, the mandate would pass on to someone else. This was a post hoc explanation to why the Shang lost power: they were corrupt cannibals who partied a lot; therefore, the Heavenly Mandate changed hands.
The Zhou dynasty lasted for 800 years, but only less than half of that was centralized rule. The second half was a series of Warring States periods where the emperor was a figurehead, and both the governing and fighting was done by feudal lords. The dynasty to emerge from the wreckage were the Qin (221-206BC). The Qin was an absolute monarchy and was arguably the first "real" emperor. In fact, the Qin emperor's title was Shi Huang Di - first emperor. The Qin were considered too harsh and tyrannical, and were quickly replaced by the Han, a popular uprising from whom we get the name for Han Chinese.
From the Han dynasty till the end of the Song dynasty in 1279 AD, Chinese history followed a standard pattern of 100-250 years of centralized rule, followed by decades of warlords fighting to become the next emperor. These periods of centralized rule were the dynasties of modern parlance. A notable one was the Tang, when much of the poetry studied today was written, and when the Chinese empire first encompassed roughly the places that Han Chinese live right now.
The Song were followed by three dynasties: Yuan (Mongol invasion), Ming (Han restoration), and Qing (Manchu invasion). While the Chinese historiography legitimizes them as dynasties (because the bureaucrats who did the record keeping weren't really in a position to argue with the conqueror), in western terms we would consider this substantial breaks in a nation's history. The Qing dynasty is also the one to expand to the borders that the PRC currently claims, including Tibet, Xinjiang, Taiwan and Mongolia.
The first Republic, in which the idea of Chinese nationalism was first forged, was established in 1912. As part of developing Chinese nationalism, they would emphasize the continuity of Chinese dynasties since the Xia. The first Republic of China quickly fell apart, and after another brief warlords era, was succeeded by the Nationalist KMT and the Communist CCP, who fought each other, teamed up to fight the Japanese in WWII, then fought each other again, leading to the KMT escaping to Taiwan and the CCP becoming de facto rulers of China.
So, when was China established? Well, mirroring our answers for France, I would say 1948 (CCP), 1912 (first Republic), 618 (Tang, first dynasty to unite the Han people), 206 BC (Han, establishment of the Han identity) or 221 BC (Qin, first emperor), but it's very much a vague definition up for interpretation. It is definitely not 5000 years old, but there's no good answer as to how old it actually is.