A pretty comprehensive article on the history of the guitar: https://www.mi.edu/education/guitar-history-how-the-guitar-has-evolved/
The exact origin of the guitar is a mystery, but “guitar” probably comes from the ancient Greek word κιθάρα (kithara). The god Hermes gets a nod for creating the first kithara from a tortoise shell and buddy Apollo was apparently an axe-man as well. The story goes that “when Apollo swept his hand across the strings, even the little waves on the blue sea stopped chasing one another to listen; then they too sang the same song, and they sing it to this day”. Party on, Hermes! Party on, Apollo!
The kithara had a wooden soundboard, box-shaped body and two hollow arms extending from the body. The instrument originally had three strings running from the crossbar to its lower end, passing over a bridge on the soundboard.
The kithara player typically struck the strings with an early version of the modern pick. The player would use his or her left-hand fingers to dampen unwanted strings and, at times, stop the strings or produce harmony with their left hand. Solo musicians would sometimes pluck the strings with the fingers of both hands. Holding a kithara is similar to holding a guitar, and musicians would often use the early equivalent of a guitar strap with an over-the-shoulder band. Rock on, ancient music dudes!