The issue with masks is one side started treating them like a talisman that makes infection impossible, which provoked the other side to say they do nothing.
On a population level, masks are probably close to ineffective against a viral pathogen. You can read the relevant Cochrane review to see that.
On an individual level they obviously do something, but you have to consider other factors as well, such as level/frequency of exposure and the like. Studies from prior to the pandemic suggested that a perfectly fitted N95 mask dramatically reduced flu virus penetration. For a more normally worn N95 the reduction was about 70%. For a surgical mask it was essentially nil. Importantly, a perfectly fitted mask required essentially gluing it to the face of a mannequin.
Final point is, with an intervention whose impact is measurable but imperfect, you have to consider the side effects. I personally know several friends of my teenage kids who now have odd (to me at least) social phobias for which the only “cure” is to wear masks everywhere. Just last weekend I was talking to a friend of my daughter who wears masks everywhere except indoors.