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:4:33

And for all, We have made heirs to what is left by parents and relatives. And to those whom your oaths have bound ˹to you˺ - give them their share. Indeed Allah is ever, over all things, a Witness.  

To each, man and woman, We have appointed heirs, relations to be given, of that, property, which parents and kinsmen leave, for them, and to those to whom your right hands (aymān, plural of yamīn, meaning ‘oath’ or ‘hand’) were pledged (read ‘āqadat or ‘aqadat), that is, those allies with whom before the coming of Islam you made covenants of mutual assitance and inheritance. So give them, now, their share, their portions of the inheritance, which is a sixth. God is ever Witness over everything, ˹ever˺ aware ˹of it˺, including your circumstances: this verse was abrogated by His words, But those related by blood are nearer to one another ˹Q. 8:75 and 33:6˺.
القرآن:٤:٣٣

وَلِكُلٍّ جَعَلْنَا مَوَالِيَ مِمَّا تَرَكَ الْوَالِدَانِ وَالْأَقْرَبُونَ ۚ وَالَّذِينَ عَقَدَتْ أَيْمَانُكُمْ فَآتُوهُمْ نَصِيبَهُمْ ۚ إِنَّ اللَّهَ كَانَ عَلَىٰ كُلِّ شَيْءٍ شَهِيدًا  

{ولكلٌ} عن الرجال والنساء {جعلنا موالي} عصبة يعطون {مما ترك الوالدان والأقربون} لهم من المال {والذين عاقدت} بألف ودونها {أيمانكم} جمع يمين بمعنى القسم أو اليد أي الخلفاء الذين عاهدتموهم في الجاهلية على النصرة والإرث {فآتوهم} الآن {نصيبهم} حظوظهم من الميراث وهو السدس {إن الله على كل شيء شهيدا} مطلعا ومنه حالكم وهذا منسوخ بقوله (وأولوا الأرحام بعضهم أول ببعض).