Oddly enough one of the people testing positive for Omicron in Hong Kong is supposed to have caught the virus because he was wearing the wrong type of mask!
Cloth masks are pretty well useless. They stop only 2% of droplets because the pore size in a cloth mask is so large at around 120 microns. From memory surgical masks can stop up to 45% of droplets - typical pore size 80 microns. However, since Covid-19 is passed via aerosols no surgical mask guarantees safety because the droplet size of an aerosol (60 microns or less) is smaller than the pores in the mask. Aerosols are not necessarily generated during normal breathing. In my local hospital surgical masks were mandatory even in non-Covid wards, but if a patient was likely to generate aerosols (e.g. had a CPAP machine or were intubated) or was coughing and sneezing the nursing staff had to don full PPE with N95 respirators (pore size 3 microns).
Surgical masks are of some value, especially if everyone is wearing masks, but they don't guarantee you won't become infected. Dr Byram Bridle does a demonstration where he shows aerosolised particles passing through 5 layers of surgical masks and fogging up his glasses. Make of that what you will.
I can't find the original study I read with the mask benefits, but the following study done BC (Before Covid) shows there's some benefit.
The CDC recommends that healthcare settings provide influenza patients with facemasks as a means of reducing transmission to staff and other patients, and a recent report suggested that surgical masks can capture influenza virus in large droplet spray. However, there is minimal data on influenza...
pubmed.ncbi.nlm.nih.gov
It's fairly obvious given the statistics that even in places with "mask mandates" the rate of infection is still high. Perhaps because people believe masks will protect them and so get a little closer than is wise. If you know someone has Covid you need to be a hell of a lot further than 6 feet to avoid infection. So in some ways masks are counter productive. I have to continuously remind my 89 year old dad that the mask is not guaranteed to prevent infection.