The Gospels were all written at least 50 years after Christ (Mark) to 100 years after him (John).
We think the Gospels are inspired by works we have since lost. The most famous is the "Quelle" or Q source (Quelle means source in German), which is supposed to be a list of sayings of Jesus.
Basically what Bible scholars do is they read each text meticulously, line by line, then they compare what is similar and different between each. Doing this - it is pretty ingenious - they are able to reverse engineer earlier texts and even figure out what percentage of each text comes from each earlier work. We started doing this in the 1800s and it's persisted to present day Bible scholarship.
The other early work (other than Q) is Mark. Basically we think Matthew and Luke used Mark (the earliest Gospel) and Quelle as sources.
The first three Gospels are called "synoptic," meaning they have roughly the same presentation of the Jesus story.
The last Gospel, John, is considered anomalous so it gets its own category. It doesn't have the same sources as the others and Jesus goes on long, philosophical sermons in it which he doesn't in the others.
We call the authors of the Gospels the evangelists.
In the New Testament, Matthew was placed first because originally we thought it was the earliest Gospel. This conclusion came from its (mostly Jewish-oriented) perspective. More recently scholarship has accurately found Mark was the earliest, using the reverse engineering method I mentioned.
There is some division over how you can interpret each Gospel but I usually present it to my students as the following:
Matthew - The "Jewish" perspective on Jesus
Christianity was originally a sect of Judaism, so Matthew is often more concerned with interpreting Christ's teachings in relation to Jewish law and tradition. Matthew is also the only Gospel written in Aramaic, not Greek.
Luke - The "Gentile" (or Greek) perspective on Jesus
As time proceeded, Christianity began to attract adherents who were non-Jews (Gentiles) - mostly people from the Hellenic world - but there was much resistance to this as it was originally a Jewish sect. Luke's view is often focused on interpreting Christ to make it more accessible to non-Jews.
The next two are my views of the other Gospels and how I usually teach them (I like to keep it simple and clear), but just know you could dispute these and interpret them differently:
Mark - Emphasis on the "Humanity" of Jesus
As you know the Christian view of Christ says he has a dual nature, both human and divine. I base this reading mostly on the very interesting conclusion to Mark - the resurrection. The resurrection is left ambiguous in the original version of Mark. Jesus does not reappear to the disciples or overtly demonstrate his risen form. This Gospel also focuses on the "mystery" of who Jesus is. It is accepted he is a prophet, and he demonstrates miracles throughout, but it is unclear who he is.
John - Emphasis on the "Divinity" of Jesus
And this is how I usually frame John: as one in which the divinity of Christ is accepted - there is no "mystery" like in Mark. Focus on his godhood rather than his humanity. For example, he begins as a divine "Logos" which preexisted.
Getting back to your question - you raise a very interesting point about the unique situation in which there are four different accounts of effectively the same narrative in Christianity.
The Gospels do offer different versions of events, tweak the exact things said by Christ, and contradict each other at different points.
While in earlier epochs you might run into the danger of being accused of heresy, I feel it enriches the religion greatly and opens it up to many different analyses and lenses.
Perhaps it is also not the point we are supposed to get the exact version of what happened, but rather understand the overall synthesis or theme of Jesus' teaching.