Quran 5:32 states that whoever kills a soul, unless as punishment for murder or corruption in the land, it is as though he had killed all mankind, and whoever saves a life it is as though he had saved all mankind. The formulation is close enough to a passage in the Mishnah, the foundational text of rabbinic Judaism compiled around 200 CE, that the relationship is treated as established rather than coincidental. Tractate Sanhedrin states that whoever destroys a single life is considered by scripture to have destroyed an entire world, and whoever saves a single life has saved an entire world, given there as the reasoning behind requiring multiple witnesses before a capital sentence.
The Quranic verse keeps the Mishnah's moral weight while placing it inside its own frame, presenting the principle as something prescribed to the Children of Israel specifically before restating it as a general teaching, and it adds two exception clauses the Mishnah passage's surrounding legal context does not carry in the same form, for murder and for corruption in the land, a phrase classical exegetes read broadly to include acts such as banditry and rebellion against legitimate authority.
Those exception clauses are the part most often left out when the verse circulates outside its own text. Quoted alone, the line about saving or destroying all mankind reads as an unconditional statement of the sanctity of every life, and it is used that way often, including in public appeals to religious tolerance. The unqualified version drops the conditions the verse itself states, and dropping them changes what the verse actually says about when killing is permitted rather than only how grave it is when it is not.