There are a thousand textbook references that describe the various forms of viral transmission that you are welcome to look up. The question that you asked is a mask prevent viral infection and the answer is no.
Please feel free to educate yourself on modes of viral transmission.
Yes or no, does the virus travel through the air by itself?