This study aimed to prepare and characterize a gas sensor based on porous silicon embedded with CdS using the laser-assisted chemical bath deposition method. The structural and optical properties of CdS thin film prepared at deposition time of 30 min were studied by X-ray diffraction (XRD), scanning electron microscope (SEM), atomic force microscope (AFM), energy dispersive X-ray (EDX), and UV-Vis spectrophotometer. The (XRD) results showed that the deposited CdS film was crystalline and the crystallinity of the film improved after using laser during deposition of the film. The value of optical energy gap of the CdS film deposited without and with laser irradiation were found to be 2.5 eV and 2.68 eV, respectively. The gas sensor based on CdS-embedded porous silicon exhibit good sensitivity to H2S gas. The sensor enables rapid detection of toxic H₂S gas, minimizing health and environmental risks and enhancing safety in industrial places.