We know that Copper ll 's symbol is

and Nitride's is

Because both have opposite charges of +2 and -2, they both cancel out when written. When writing a chemical formula, the cation (positive ion/element) is written before the anion (negative ion). The formula name already had the correct order. Therefore, your chemical formula is just
CuNHope this helps!