According to Islamic teaching, the Quran came down as a series of revelations from Allah through the Archangel Gabriel to the Prophet Muhammad, who then dictated it to his followers. Muhammad’s companions memorized fragments of the Quran and wrote them down on whatever was at hand, which were later compiled into book form under the rule of the third Caliph, Uthman, some years after Muhammad’s death.
While in Mecca, though Muhammad condemned paganism (for the most part), he showed great respect for the monotheism of the Christian and Jewish inhabitants. Indeed, the Allah of the Quran claimed to be the same God worshipped by Jews and Christians, who now revealed himself to the Arab people through his chosen messenger, Muhammad. It is the Quranic revelations that came later in Muhammad’s career, after he and the first Muslims left Mecca for the city of Medina, that transformed Islam from a relatively benign form of monotheism into an expansionary, military-political ideology that persists to this day.
Those Westerners who read a translation of the Quran are often left bewildered as to its meaning thanks to ignorance of a critically important principle of Quranic interpretation known as “abrogation.” The principle of abrogation — al-naskh wa al-mansukh (the abrogating and the abrogated) — directs that verses revealed later in Muhammad’s career “abrogate” — i.e., cancel and replace — earlier ones whose instructions they may contradict. Thus, passages revealed later in Muhammad’s career, in Medina, overrule passages revealed earlier, in Mecca.
Skepticism was directed at Muhammad that Allah’s revelations were not entirely consistent over time. Muhammad’s rebuttal was that “Allah is able to do all things” — even change his mind. To confuse matters further, though the Quran was revealed to Muhammad sequentially over some twenty years’ time, it was not compiled in chronological order. When the Quran was finally collated into book form under Caliph Uthman, the suras were ordered from longest to shortest with no connection whatever to the order in which they were revealed or to their thematic content. In order to find out what the Quran says on a given topic, it is necessary to examine the other Islamic sources that give clues as to when in Muhammad’s lifetime the revelations occurred. Upon such examination, one discovers that the Meccan suras, revealed at a time when the Muslims were vulnerable, are generally benign; the later Medinan suras, revealed after Muhammad had made himself the head of an army, are bellicose.
So in one place it says be tolerant of people of the book and in another place it says slay them where you find them.
Excerpts are from https://www.jihadwatch.org/islam-101
Well that makes things easy. Written by others from memory, complied without any reguard for order. Makes understanding it easy.