The Bible does not tell us what Mary used for diapers, but we can conjecture based upon what we know about baby care in the ancient world.
Luke 2:7 says Mary wrapped Jesus in “swaddling cloths”. In ancient times it was common from babies to wrapped in cloth, but with an opening left near the buttocks. Women would carry a small clay pot and would hold this in position when the baby was about to excrete. This may sound strange in the modern world of disposable diapers, but many mothers to still practice this.