Plague is a calamity which was inflicted on those who were before you, or upon Bani Isra'il. So when it has broken out in a land, don't run out of it, and when it has spread in a land, then don't enter it.
قَالَ رَسُولُ اللَّهِ ﷺ إِنَّ هَذَا الطَّاعُونَ رِجْزٌ سُلِّطَ عَلَى مَنْ كَانَ قَبْلَكُمْ أَوْ عَلَى بَنِي إِسْرَائِيلَ فَإِذَا كَانَ بِأَرْضٍ فَلاَ تَخْرُجُوا مِنْهَا فِرَارًا مِنْهُ وَإِذَا كَانَ بِأَرْضٍ فَلاَ تَدْخُلُوهَا