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:19:49

So when he had left them and those they worshipped other than Allah, We gave him Isaac and Jacob, and each ˹of them˺ We made a prophet.  

And so after he had shunned them and that which they worshipped besides God, by having set off to the Holy Land, We gave him, two sons for him to find solace in, Isaac and Jacob, and each, of the two, We made a prophet.
القرآن:١٩:٤٩

فَلَمَّا اعْتَزَلَهُمْ وَمَا يَعْبُدُونَ مِنْ دُونِ اللَّهِ وَهَبْنَا لَهُ إِسْحَاقَ وَيَعْقُوبَ ۖ وَكُلًّا جَعَلْنَا نَبِيًّا  

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