This article investigates the trapping mechanism in AlGaN/GaN heterostructure. For our study, the traps within the AlGaN layer are introduced at the interface and near the interface of AlGaN/GaN, in the SILVACO TCAD tool. Frequency-dependent Capacitance-Voltage (CVF) curves are obtained to study the impact of traps on device performance. From the CVF curve, it is found that the existence of interface traps introduces a shift in capacitance along the gate voltage axis. These traps introduce the threshold voltage (V_TH) shift. Furthermore, a detailed study of near-interface traps (NITs) is done based on tunneling mechanisms. For our investigation, the NITs are positioned at 0.5 nm, 1 nm, and 1.5 nm away from the AlGaN/GaN interface. The response of the NITs reduces the capacitance value in the accumulation region. The response of the NITs is explained through the capacitance charge model and border trap model. For NITs placed 0.5 nm away from the interface, the frequency dispersion in the accumulation region becomes evident. On the contrary, the dispersion reduces significantly, as the NITs goes deeper upto 1.5 nm. The results indicate that the NITs nearer to the interface respond to high frequencies. Further, the temperature dependent Capacitance-Voltage (CVT) analysis is done for both interface and near-interface traps (NITs), to understand the effect of temperature on frequency dispersion.