Cr is in the +3 oxidation state i.e. d3 configuration. Also, NH3 is a weak field ligand that does not cause the pairing of the electrons in the 3d orbitals.

Therefore, it undergoes d2sp3 hybridisation and the electrons in the 3d orbitals remain unpaired. Hence, ibis paramagnetic in nature.
In [NiCCN)4]2-, Ni exists in the +2 oxidation state.
i.e, d8 Configuration.

CN- is a strong field ligand. It causes the pairing of 3d orbital electrons. Then Ni2+ undergoes dsp2 hybridisation.

As there are no unpaired ejecirons, it is diamagnetic.