How does one, such a long time ago discover or devise such an effective form of healing that is still in use in modern day?
They started with the building blocks of all life, animate and inanimate.
Just as in our modern day understanding we have the periodic table categorizing the matter that makes up the physical world they too had a categorized system, for a clearer understanding.
Ayurveda is based on The Panchmahabhutas, The Five Great Elements.
Panch = Five
Maha = Great
Bhutas = Elements
These elements categorize all that we hear, feel, see, taste and smell into 5 base components.
The 5 elements are
Akash = Space
Vayu = Air
Jala = Water
Agni = Fire
Prithvi = Earth
Just like the periodic table the elements are listed in order of density, so without the existence of space nothing can exist within it.
Space is the primary element of Ayurveda, similarly the space element of pure hydrogen is the first element of the periodic table.
Outer space is the closest known thing to a perfect vacuum however even the deep vacuum of intergalactic space is not completely devoid of matter, as it contains a few hydrogen atoms per cubic meter.
Each element is comparable to our our own elements found within the periodic table. So in Vedic culture they had a complete and sophisticated understanding of the elemental make up of our world by starting with the building blocks.