mega 2560 r3 only works without one of 22p caps of crystal of atmega16u2

The cap may be the wrong value and is preventing oscillation.
Folks have mistakenly used 22uF, 1uF, 0.1uF, instead of 22pF and kept their boards from working.
Measure the one you took off, see what it is. Many meters can measure capacitance.