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

And He caused you to inherit their land and their homes and their properties and a land which you have not trodden. And ever is Allah, over all things, competent.  

And He made you inherit their land and their homes and their possessions, and a land you had not trodden, thitherto, and this was ˹the territory of˺ Khaybar, which was captured after ˹that of˺ Qurayza. And God has power over all things.
القرآن:٣٣:٢٧

وَأَوْرَثَكُمْ أَرْضَهُمْ وَدِيَارَهُمْ وَأَمْوَالَهُمْ وَأَرْضًا لَمْ تَطَئُوهَا ۚ وَكَانَ اللَّهُ عَلَىٰ كُلِّ شَيْءٍ قَدِيرًا  

{وأورثكم أرضهم وديارهم وأموالهم وأرضا لم تطؤوها} بعد وهي خيبر أخذت بعد قريظة {وكان الله على كل شيءٍ قديرا}.