Masks will help a little to keep you from spreading an infection if you have it but do little to prevent you from being infected.
About the best thing you can do to prevent yourself from getting pretty much any virus is to not go into a heavily infected area, wash your hands properly and often, and avoid touching your eyes, mouth, and nose.