"masks prevent an infected person from transmitting the virus... not an uninfected person from getting infected
The only effective mask is an N95 and we have been told those are too precious to be wasted on us. However, even an N95 mask has to be fit tested and is not effective unless that is done and the mask is used properly.
https://www.mayoclinic.org/diseases-conditions/coronavirus/in-depth/coronavirus-mask/art-20485449
Surgical masks
Also called a medical mask, a surgical mask is a loose-fitting disposable mask that protects the wearer's nose and mouth from contact with droplets, splashes and sprays that may contain germs. A surgical mask also filters out large particles in the air. Surgical masks may protect others by reducing exposure to the saliva and respiratory secretions of the mask wearer.
At this time, the U.S. Food and Drug Administration has not approved any type of surgical mask specifically for protection against the coronavirus, but these masks may provide some protection when N95 masks are not available.
Cloth masks
A cloth mask is intended to trap droplets that are released when the wearer talks, coughs or sneezes. Asking everyone to wear cloth masks can help reduce the spread of the virus by people who have COVID-19 but don't realize it.
Cloth face coverings are most likely to reduce the spread of the COVID-19 virus when they are widely used by people in public settings. And countries that required face masks, testing, isolation and social distancing early in the pandemic have successfully slowed the spread of the virus.
While surgical and N95 masks may be in short supply and should be reserved for health care providers, cloth face coverings and masks are easy to find or make, and can be washed and reused.
Masks can be made from common materials, such as sheets made of tightly woven cotton. Instructions are easy to find online. Cloth masks should include multiple layers of fabric. The CDC website even includes directions for no-sew masks made from bandannas and T-shirts.