This claim is false. There is plenty of research proving that masks help fight against virus transmissions. According to the CDC, "Wearing a mask can help lower the risk of respiratory virus transmission.", meaning that when harmful bacteria and illnesses are going around, having a mask creates a shield of protection against those viruses. Therefore, minimizing your chances of getting sick and being effective.
Another article I found published by Mayo Clinic, an organization that focuses on clinical practices, states that "For people at high risk, the CDC suggests you wear a mask that provides you with the most protection possible", this is because they offer protection against any viruses in the air and slow down the transmission of these viruses. The website also lists the different kinds of masks that are effective and how to use them.
“Can Face Masks Protect against Covid-19?” Mayo Clinic, Mayo Foundation for Medical Education and Research, 4 Nov. 2023, www.mayoclinic.org/diseases-conditions/coronavirus/in-depth/coronavirus-mask/art-20485449.