In this work, we report on a comparative study of the structural, optical, and elastic properties of SrTiSe3 and SrZrSe3 compounds using the DFT method. The lattice constants of the compounds are calculated using the GGA-PBE approximation and the hybrid functional Heyd, Scuseria, and Ernzerhof (HSE). The properties of the SrTiSe3 and SrZrSe3 materials in relation to electronic composition, elastic constants, and optical characteristics are deduced and analyzed. Both compounds display magnetic behavior, according to electronic calculations. SrTiSe3 shows metallic behavior, as the calculated bandgap value is zero. SrZrSe3, on the other hand, has a bandgap of 0.347 eV, which demonstrates its semiconducting nature. We have demonstrated that the plasma frequency of SrTiSe3 is around 1.77836. Using density functional theory, we report on the electronic characteristics of the compounds under mechanical stress. For SrZrSe3, the gap energy values rise with compressive stress and decrease with increasing tensile stress to zero. In addition, the study includes the extinction coefficient, optical conductivity, dielectric tensor, electron energy loss, and refractive index.