Actually, they do help especially when worn by someone who’s sick. Masks reduce the amount of respiratory droplets and saliva released when coughing, sneezing, or even talking. That’s how they lower the chance of spreading viruses to others.
Numerous studies (including those published in Nature and by the CDC) have shown that surgical and N95 masks (even those simple surgical masks) significantly reduce droplet and aerosol transmission, particularly in indoor or crowded environments.