As the world recognizes the need to transition away from fossil fuel-driven energy conversion technologies, there is a global movement towards clean and renewable power. The purpose of this research is to improve the performance of KSnI3--based solar cells by introducing low-cost and widely available Spiro-OMeTAD as the hole transport layer and TiO2 as the electron transport layer into the basic structure of PSCs. The parameters such as open circuit voltage, short circuit voltage, fill factor, and power conversion efficiency are analyzed by the SCAPS-1D program. Through the optimization of various factors including thickness, doping density, defect density, temperature, back contact, series and shunt resistance, PSC has been achieved with impressive performance having power conversion efficiency (PCE) = 20.34%, fill factor (FF) = 80.36%, short circuit current density (Jsc) = 18.8547 mA/cm2, and open circuit voltage (Voc) = 1.3428 V which is higher than that in previous study. This study’s results improve the way for the development of more sustainable and eco-friendly PSCs, which is contributing to the goal of clean and renewable energy generation.