Plague is the sign of a calamity with which Allah, the Exalted and Glorious, affects people from His servants. So when you hear about it, don't enter there (where it has broken out), and when it has broken out in a land and you are there, then don't run away from it.
قَالَ رَسُولُ اللَّهِ ﷺ الطَّاعُونُ آيَةُ الرِّجْزِ ابْتَلَى اللَّهُ ﷻ بِهِ نَاسًا مِنْ عِبَادِهِ فَإِذَا سَمِعْتُمْ بِهِ فَلاَ تَدْخُلُوا عَلَيْهِ وَإِذَا وَقَعَ بِأَرْضٍ وَأَنْتُمْ بِهَا فَلاَ تَفِرُّوا مِنْهُ هَذَا حَدِيثُ الْقَعْنَبِيِّ وَقُتَيْبَةَ نَحْوَهُ