Dye-sensitized solar cells (DSSCs) are garnering significant interest because of their cost-effective production process and promising potential for future prospects. This paper presents an innovative approach to the fabrication of DSSCs. Further, a comparative study of DSSCs has been carried to evaluate the performance of the solar cells. BaSnO3 (BSO)- and TiO2-based DSSCs were fabricated with the incorporation of a ruthenium-based N719 dye [(Bu4N)(2)(Ru)(dcbpyH)(2)(NCS)(2)]. The sol-gel technique, facilitated by a microwave oven, was employed for the synthesis of the solar cell materials. Subsequently, these materials were deposited on a fluorine-doped SnO2 glass substrate via doctor blade method. Comprehensive analysis of the structural, optical, and electrical properties of the powder and FTO/BSO/N719/electrolyte/Pt and FTO/TiO2/N719/electrolyte/Pt cells was conducted using x-ray diffraction, scanning electron microscopy, UV-Vis-NIR spectroscopy, and current-voltage (J-V) characteristics. The BSO DSSC demonstrated higher incident photon-to-current conversion efficiency in the UV-Vis region and better overall performance than the TiO2-based cell with a similar experimental environment. The BSO-based DSSC exhibited maximum conversion efficiency (eta) of 2.64%, whereas the TiO2-based DSSC demonstrated maximum conversion efficiency of 2.19%. [GRAPHICS] .