Abel and Cain were not the only children of Adam. When Hawwa [Eve] gave birth, she would give birth to one boy and one girl.
Shaikh al-Albani [may Allah have mercy upon him] wrote:
“It was reported by Ibn Jareer in the Tafseer (10/207/11715) and in the Tarikh (1/68,69) from Ibn ‘Abbas and Ibn Mas’ud and a group from the Companions of the Messenger of Allah (may Allah be pleased with them) that a newborn was not born to Adam except it was a boy along with a girl [i.e. twins]. So the boy from this birth would marry the girl from another birth. And the girl from this birth would marry the boy from the other birth until he had two sons named: Qaabeel and Haabeel. Qaabeel was a companion of agriculture and Haabeel was a companion of cattle…So when Haabeel gave fat calf as an sacrifice and Qaabeel give a bundle of grain…A fire came down and consumed the offering of Haabeel and left the offering of Qaabeel. So he became angry and said: ‘I will kill you’. Haabeel said: “Verily Allah only accepts from the pious'”
I [Shaikh al-Albani] say: Its chain of transmission is Jayyid and its narrators are reliable, the narrators of Muslim. [Tahqeeq Bidyatus-Suul (pg. 71)]
Shaikh al-Albani (may Allah have mercy upon him) also said that Hafidh Ibn Kathir graded its chain of transmission as Jayyid in his Tafsir of [5:27] and as-Suyuti followed him in that.
So when Cain killed Abel, it does not mean that all of Adam’s progeny were cut off. Rather he had many other children who from there came humanity. And Allah says in the Quran:
يَا أَيُّهَا النَّاسُ اتَّقُوا رَبَّكُمُ الَّذِي خَلَقَكُمْ مِنْ نَفْسٍ وَاحِدَةٍ وَخَلَقَ مِنْهَا زَوْجَهَا وَبَثَّ مِنْهُمَا رِجَالًا كَثِيرًا وَنِسَاءً وَاتَّقُوا اللَّهَ الَّذِي تَسَاءَلُونَ بِهِ وَالْأَرْحَامَ إِنَّ اللَّهَ كَانَ عَلَيْكُمْ رَقِيبًا
O mankind! Be dutiful to your Lord, Who created you from a single person (Adam), and from him (Adam) He created his wife [Hawwa (Eve)], and from them both He created many men and women and fear Allah through Whom you demand your mutual (rights), and (do not cut the relations of) the wombs (kinship). Surely, Allah is Ever an All-Watcher over you [4:1]
And Allah Knows Best
Faisal bin Abdul Qaadir bin Hassan
Abu Sulaymaan