Depends on the type. Are they dead, or somewhat still alive?
Canon dictates that your classic "Romero-type 'Supernatural' risen-undead zombies" can eat, but do not poop, lacking as they do any of the metabolic processes required. Due to a combination of impaction and trapped gasses produced by bacterial action, they just sort of swell up and burst open. Depending on their state when interred, and their current state of decomposition. Those that had undergone a post mortem would tend to split open at the seams of the Y incision. Then they just sort of drag whatever hangs out around with them. Can't poop.
Biological zombies: Caused by a strange alien disease or a bacteria organism. Parasites modify the host creature’s behavior. Can poop.
Chemical zombies: Strange chemicals are discovered and are meant to bring back the dead to life, or zombify the living. Might poop.
Technological zombies: Involve the use of advanced technology to bring the dead back to life, or zombify the living. Might poop.
Constructed zombie: Remains of other creatures are used to create the zombie. Depending on condition (living or dead) Might poop.
Magic zombie: Zombies come as a result of the powers possessed by witches, sorcerers, etc. The powers are used to reanimate the dead, and follow the will of the creator. Being reanimated dead, can't poop.
There are more, but this is just a basic overview. https://zombie.fandom.com/wiki/Types_of_Zombies
(post is archived)