A recent study at Montreal's Institut de Recherche Robert-Sauvé en Santé et Sécurité du Travail (an institute dedicated to research in occupational health and safety in Quebec, Canada) looked at artisanal or DIY masks and their ability to filter out droplets such as the ones that might carry airborne viruses and bacteria. The findings were that readily available materials such as cotton do not make for effective filters. In some cases, cotton can be used for the outer shell of a mask but one cannot rely on the cotton to effectively filter out very small droplets such as the ones that might carry viruses or bacteria. Other easily accessible materials such as coffee filters are to rule out altogether as well.
Despite the attractiveness of DIY masks, a person looking for enhanced protection might consider the use of a mask that is made from dedicated protective materials. N95 or KN95 masks are used in medical contexts for their ability to filter over 95 % of small airborne particles. Someone looking for a civilian masks might consider the use of masks with disposable filters. Some filters such as the N99 filters are lab tested to filter out over 99 % of certain airborne particles such as viruses and bacteria and in some cases, can filter partially some organic compounds. A proper N99 filter will be multilayered and non-woven (so there are no repetitive "meshes" that viruses can more easily go through but rather an inter-twinning of fibers). In laboratory settings, filters will be exposed to a flow containing viruses such as influenza and bacteria such as K. Pneumoniae and E. Coli. The filtered flow will then be tested and should confirm a filtration of over 99% of these pathogens.
A proper reusable masks made from antibacterial fabric coupled with an N99 filter can thus prove a much better alternative than a DIY or artisanal masks if optimal protection is your top priority. Other factors such as a nose clip and a proper chin piece will make for a mask that is closer to a protective equipment than a fashion item.