Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:5:70

We had already taken the covenant of the Children of Israel and had sent to them messengers. Whenever there came to them a messenger with what their souls did not desire, a party ˹of messengers˺ they denied, and another party they killed.  

And We made a covenant with the Children of Israel, to believe in God and His messengers, and We sent messengers to them. Every time a messenger came to them, from among them, with what their souls did not desire, in the way of truth, they denied it; some, of them, they denied, and some, of them, they slay, such as Zachariah and John (the use of ˹the present tense˺ yaqtulūn, ‘they slay’, instead of ˹the perfect tense˺ qatalū is to narrate past events ˹as if in the present˺ and to conclude ˹in harmony with˺ the end124 rhyme of the verses).
القرآن:٥:٧٠

لَقَدْ أَخَذْنَا مِيثَاقَ بَنِي إِسْرَائِيلَ وَأَرْسَلْنَا إِلَيْهِمْ رُسُلًا ۖ كُلَّمَا جَاءَهُمْ رَسُولٌ بِمَا لَا تَهْوَىٰ أَنْفُسُهُمْ فَرِيقًا كَذَّبُوا وَفَرِيقًا يَقْتُلُونَ  

{لقد أخذنا ميثاق بني إسرائيل} على الإيمان بالله ورسله {وأرسلنا إليهم رسلا كلما جاءهم رسول} منهم {بما لا تهوى أنفسهم} من الحق كذبوه {فريقا} منهم {كذَّبوا وفريقا} منهم {يقتلون} كزكريا ويحيى والتعبير به دون قتلوا حكاية للحال الماضية للفاصلة.