The most common way of catching is by breathing in droplets, so they do provide some protection to the mask wearer.
Wear Masks To Protect Yourself From The Coronavirus, Not Only Others, CDC Stresses
Does My Mask Protect Me if Nobody Else Is Wearing One?
Masks work best when everyone in the room has one on, but you’ll still benefit from masking up even when those around you aren’t.www.nytimes.com
Does Wearing a Mask Prevent the Flu?
Learn when masks can help and what other hygiene measures to take for prevention.www.healthline.com
ETA - And, it's not just about protection against catching it, but also reducing the viral load if you do, thus reducing how bad it will be.
I think the argument is now that via fine aerosol droplets in poorly ventilated rooms is basically the only way Covid is spread in real-world conditions:
Transmission of Severe Acute Respiratory Syndrome Coronavirus 2 during Border Quarantine and Air Travel, New Zealand (Aotearoa)
Transmission of SARS-CoV-2 during Air Travel
wwwnc.cdc.gov
What the world can learn from New Zealand’s Covid-19 bin mystery
In New Zealand, investigators traced an outbreak to a 50-second window of exposure. The case might be a lesson for countries contemplating a future with no Covid-19
www.wired.co.uk
Coronavirus spread on flight, in hotel corridor, New Zealand study finds
The coronavirus spread on an international flight, in a hotel corridor and then to household contacts despite efforts to isolate and quarantine patients, New Zealand researchers reported Thursday.
edition.cnn.com