Photoacoustic spectroscopy (PAS) is highly valued in gas detection for its outstanding sensitivity and rapid response. Addressing its limited precision in trace gas analysis, scholars have taken numerous measures to optimize structural and modify the size of acoustic sensors and photoacoustic cells (PACs). Nevertheless, advancements in laser modulation remain understudied due to technical difficulties. This paper theoretically examines the effects of intensity modulation with square wave signals and wavelength modulation involving sawtooth and sinusoidal. In this paper, a theoretical approach is proposed to examine the effects of intensity modulation with square wave signals and wavelength modulation involving sawtooth and sinusoidal signals. Experimental measurements were performed using parameters obtained in preliminary experiments. We constructed an experimental setup with varied-length PACs to bolster experimental dependability, focusing on H2S as the target gas to compare the two laser modulation techniques. The results exhibited that at low frequencies, intensity modulation outperforms wavelength modulation. At resonance frequencies, however, wavelength modulation could provide stronger signals’ intensity. Modulation frequency considerations are therefore crucial when choosing a modulation method for PAS gas detection. Without specific frequency requirements, a second harmonic modulation at resonance is recommended. This study provides guidance on selecting laser modulation methods for PAS, potentially refining the technique’s application in trace gas analysis.