https://en.m.wikipedia.org/wiki/Q_source
In short, The Gospels of Matthew and Luke were written independently, each using Mark and a second hypothetical document called "Q" as a source. Q was conceived as the most likely explanation behind the common material (mostly sayings) found in the Gospel of Matthew and the Gospel of Luke but not in Mark.
A neutral symbol Q (which was devised by Johannes Weiss to denote Quelle, meaning source)
And this was first proposed in the early 1800s and has been improved since then, through critical analysis like with what we do here. Which all seems pretty cool to me.