How does pchain damps the pressure oscillations in npt ensemble?

As stated in the lammps documentation:

An alternative way to control initial oscillations is to use chain thermostats. The keyword *tchain* determines the number of thermostats in the particle thermostat. A value of 1 corresponds to the original Nose-Hoover thermostat. The keyword *pchain* specifies the number of thermostats in the chain thermostatting the barostat degrees of freedom. A value of 0 corresponds to no thermostatting of the barostat variables.

From this paragraph, it is vague to me whether one should set pchain to 0 to damp the pressure oscillations or set it to a nonzero value?

That means you have not fully understood how the Nose-Hoover mechanism works. Please have a look at the corresponding literature. There you should also find papers discussing what kind of settings are required to obtain the desired distributions for a correct representation of the desired ensembles.

Please also note that this comment is not for the general case, but in reference to the rather special situation of excessive fluctuations due to a small and rather incompressible system. Those are due to resonances. For any Nose-Hoover based thermostat or barostat is it crucial that the system is only weakly coupled to the fictitious degrees of freedom, but in extreme cases, those may require impractical settings.