In the present work, we have studied the structural, magnetic, electronic and elastic properties of the Heusler alloys XZrZ (X = Ni, Cu, Z = C, B).For this purpose, we performed ab-initio calculations using first principle method based on (DFT), using the full potential linearized augmented plane wave (FP-LAPW), implemented in the Wien2k code. In order to determine these properties, we used the approximation of the generalized gradient (GGA) for the term of the exchange and correlation potential (XC).Both materials have a semi-conductor character; the NiZrC has a 0.18eV direct bandgap, and the CuZrB possesses a 0.27eV indirect bandgap, which helps these compounds to have a crucial figure of merit (ZT) value that is a function of temperature up to 1200K. Mainly, good thermoelectric performance requires a high Seebeck coefficient, high electrical conductivity, and low electronic thermal conductivity. Making these compounds promising candidates for thermoelectric applications. In addition, the optical dielectric function, the reflectivity, and the refractive spectra are performed.