N95 masks, fitted properly, do help prevent catching the virus. For a mask to be called N95 it has to be approved by the CDC. It’s specifically designed to block >95% of airborne particles. That’s why they’re recommended for caretakers at hospitals and frontline workers dealing with infected patients. Replaced every ~3 hours and worn in combination with goggles and ear protection, they minimize the risk of infection through mucosal membranes. They have also been in short supply.
Surgical masks do not prevent catching the virus, but they help sick people not to spread it due to the mask catching some of the spray droplets when they cough / sneeze
That's not true at all. There is a reason why surgical masks are used by surgeons, but for the protection level needed by medical professionals, it is used as a part of a wider system.
Used casually it prevents much of the droplets in the air from entering your respiratory system, as well as preventing a lot of touching of the face. There are studies that indicate wearing a mask decreases virus respiratory several-fold.
The reason the N95 filters work is because when the air is sucked in, it must pass through the filter before entering your respiratory system, and that filter is designed to filter >95% of airborne particles (and often times even higher). For the surgical masks, the air just gets sucked in from the side, the path of least resistance. So the airborne particles would also just get sucked in from the side. The masks may cause changes in behavior that lead to lower infection probability (such as reminding you not to touch your face), but dipping your hand in glitter would be just as effective.