Metamaterial absorption can be realized at extremely long wavelengths and across a broad range of frequencies for spectroscopic applications. Among these, terahertz (THz) spectroscopy has gained increasing adoption for sensing applications due to its distinctive optical characteristics. This study proposes and numerically investigates a perfect absorber (PA) in THz spectroscopy, comprising a periodic array of indium antimonide (InSb), a reflector, and a dielectric substrate. Numerical outcomes indicate that the PA is able to obtain 99.9% absorption at 1.748 THz under the surrounding temperature (T = 295 K) and exhibits a Q-factor of approximately 26.4. To interpret the underlying physics of the proposed PA, impedance matching theory, the spatial distribution of the electric field, and power loss density are discussed. The proposed structure demonstrates exceptional stability across a broad spectrum of incidence angles. Furthermore, it delivers simultaneous high sensing performance. The surrounding temperature significantly affects the optical properties of InSb, resulting in a temperature sensitivity of 11.38 GHz/K. The suggested PA can be useful in refractive index (RI) sensing due to its higher sensitivity and greater Q-factor. It has an RI sensitivity of roughly 1452 GHz/RIU. Therefore, the designed tunable THz PA can be extensively employed in sensing, detection, and other associated optoelectronic devices because of its enhanced sensing performances.