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:16:41

And those who emigrated for ˹the cause of˺ Allah after they had been wronged - We will surely settle them in this world in a good place; but the reward of the Hereafter is greater, if only they could know.  

And those who emigrated for God’s cause, to establish His religion, after they had been wronged, through harm, ˹those˺ from among the people of Mecca — these were the Prophet (s) and his Companions — truly We shall lodge them in this world in a goodly lodging, namely, Medina, and the reward of the Hereafter, that is, Paradise, is surely greater, grander, did they but know, that is, the disbelievers — or those who stayed behind and did not emigrate — ˹did they but know˺ the honour that belongs to emigrants, they would have followed them.
القرآن:١٦:٤١

وَالَّذِينَ هَاجَرُوا فِي اللَّهِ مِنْ بَعْدِ مَا ظُلِمُوا لَنُبَوِّئَنَّهُمْ فِي الدُّنْيَا حَسَنَةً ۖ وَلَأَجْرُ الْآخِرَةِ أَكْبَرُ ۚ لَوْ كَانُوا يَعْلَمُونَ  

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