This is not true. The only way to avoid infection completely is to self-isolate entirely, which is not practical or mentally helpful. However, wearing a mask does decrease the risk of spreading the virus. Public health officials believe that wearing a surgical or a homemade face mask, along with social distancing, are key in controlling the spread of Covid-19. While wearing a mask may be uncomfortable, it does not lead to any oxygen deficiency or CO2 intoxication according to health authorities.
Check out these resources to learn more about the use of face masks here: