The virus is spread by droplets in the air that people either breath in or land on surfaces which people touch and then infect themselves with.
Anything that decreases the amount of droplets entering the air (transmission) or prevents you touching your face is effective to an extent.
The white/blue surgical masks you see most people wearing are leas effective but better than nothing.
After that you have FFP1 and FFP2 which have filters but don't offer full seals.
Lastly there is FFP3 which offers the most protection. These masks need to be fitted by an expert to offer the most protection but can still be used by members of the public without being fitted. Obviously they will offer less protection than if they were fitted but this is the best people can get.
Social distancing, staying home, washing your hands and wearing PPE are all things you can do to reduce your chance of contracting the virus or unknowingly shedding it if you're asymptomatic. They're not mutually exclusive .... i.e. it's not one or the other. People should be doing all of those things in combination. Similarly, saying you shouldn't wear a mask because it isn't fool proof is idiotic. That's like saying you shouldn't wear a bullet proof vest because it won't stop 50.kal rounds from a BMG. It will stop most small arms fire though and is obviously better than wearing no armour at all....
Of course the government doesn't currently recommend masks as necessary, but then they were initially going for herd immunity and did a huge u-turn and if the debacle over PPE and ventilators has shown anything it's that the government have been rather incompetent. It's far more likely they don't want people buying PPE due to the shortages and I'd rather trust the WHO and what every other country is doing. People in Asia where pandemics have been more common in the past wear masks for a reason. They wear them because they work.
I've included 3 images to show the different types of masks.
I personally have the last one shown which is a FFP3 mask which I bought from Tool Station back in late January.