Legend first — evidence second
The famous story says the legendary Chinese ruler Shennong discovered tea when leaves fell into boiling water around 2737 BCE. It is a powerful origin story, but it should be treated as legend rather than a dated historical event.
What is much safer to say is that tea use developed in China over a very long period. Early written terminology is difficult because ancient words could refer to more than one bitter plant, so historians distinguish later tea culture from legendary beginnings.