More layers provide more protection, but if you feel short of breath in a double mask, it may be too many layers for you. If you are exercising in a double mask, be alert for breathlessness and monitor how it feels; don’t push yourself further than you normally would.
The other problem with extra layers is that when breathability decreases, it means resistance of the mask to the passage of air has increased. This increases the pressure inside the mask and may cause leaking around the edge. Sometimes the double mask, with two sets of head fastenings, will get around this problem as the fit to the face is more snug and held in place by more points.
But there will be diminishing returns if the breathability is so poor. You can watch out for this when you add the second mask — does the amount of leakage feel less, or more, than when you wore one of the masks alone? And can you breathe comfortably enough for the task you are planning?