It depends on the country, in the US you should subscribe to CDC alerts and follow the news.
https://www.cdc.gov/publichealthgateway/healthalerts/index.h...
In South Korea people get emergency alerts on their phones whenever they enter an area that is affected.
This strategy may be used by other countries too in the near future, so check if emergency alerts are configured on your phone.