If you just blow into a tube, it will resonate and make a sound. It's not far from that to notice that different length tubes make different notes. Eventually someone found that blowing in a tube with a hole in the side will change the note if one blocks the hole with a finger.
By then, one is off and running with developing a workable flute.
By then, one is off and running with developing a workable flute.