Farts are actually made up of many different gases. The ones that actually smell are less than 100 times smaller than a COVID-19 virus particle. And the droplets of moisture that viral particles are travelling on are many times larger than that!
As said before, those small viral particles may be so small that they can just pass through the fabric of most masks, but those viral particles also travel in large droplets of moisture (that are way way bigger than the virus) from our breath. So if you wear a mask, it helps to prevent those droplets of moisture from leaving your mouth. Again, if it feels hot and humid inside the mask whenever you are breathing, it's working!
If you're worried that, because it feels hard to breathe when you're wearing a mask (because it's trapping moisture from your breathe that may or may not contain viral particles), that you may be accumulating carbon dioxide gases or that you're not getting enough oxygen: Again just know that gas particles like those are many many times smaller than a COVID-19 virus particle or even particles that your mask blocks!
Carbon dioxide diffuses out through your mask very quickly,
Doctors and nurses who are working right now to treat patients with COVID-19 wear masks for long periods of time (like hours at a time!), and they are still getting the oxygen that they need to work. Check this guy out who wore an entire box of surgical masks and still has a blood oxygen level of 99%. So don't even worry about not getting the oxygen you need or expelling enough carbon dioxide while you're wearing a mask.
Literally almost nothing in this world, especially those of medical techniques and practices, are 100% effective. The point is that masks are effective against stopping the transmission of diseases. Wouldn't you want to take a 50% chance against stopping something rather than a 0% chance?