This paper explores the impact of CZTS based solar cells using zinc magnesium oxide (Zn1-XMgXO) as a buffer layer and CuI (Copper iodide) as the hole transport layer using through SCAPS-1D(Solar Cell Capacitance Simulator) simulator. In the proposed work, the cell characteristics of the CZTS absorber layer, including electron affinity, defect density, and acceptor concentration, have been tuned. In addition, the study examines the effects of CBO which enhances the transfer of charge carriers by optimizing band alignment, Series resistance(Rs), Shunt resistance(Rsh), and Work Function (WF) of the metal contacts on the solar cell's performance. From structures, CZTS/Zn1-XMgXO with x =0.0652 demonstrated the highest PCE of 32.63% improvement in open circuit Voltage (Voc) =1.0885 Volts, Short circuit density (Jsc) = 33.89, and fill factor (FF) = 88.43%.