iFixit documents battery, ear-pad and microphone-array replacement. The left and right ear pads differ and should be ordered for their sides.
What to check before buying
Ear pads and microphones
The WH-1000XM4 ear-pad guide warns that the two sides differ. A separate microphone-array guide exists, which matters for a noise-cancellation or call complaint that persists with sound output working.
Battery route
iFixit's battery guide covers a single-cell replacement. It also describes a battery-disconnect check before replacing the cell for some charging complaints, so diagnosis can precede the parts purchase.