Surgical masks or filtered respirators?
The simplest rule is to wear a surgical mask – but remember that they are single-use and need changing every 2-3 hours, otherwise you risk breathing your own germs.
If you haven't been able to obtain a supply of surgical masks, consider filtered half-masks/respirators with a protection level of FFP2: that's what the World Health Organization recommends for healthcare workers. Respirators are also single-use. Respirators without a valve need to be changed every 2-3 hours; with a valve, every 8 hours. If the respirator becomes moist from your breathing it should be changed in either case.