In this numerical research, the heterojunction Al/FTO/ZnS/CH3NH3SnI3/MoO3/Au solar cell structure is designed, and its photovoltaic (PV) characteristics are investigated using the SCAPS-1D simulator. Furthermore, a comparison of the PV output metrics of the CH3NH3SnI3-based PSCs with several electron transport layers (ETLs) and hole transport layers (HTLs) is also presented in this research. From the outcomes, it is apparent that the proposed PSC with ZnS as ETL and MoO3 as HTL provides outstanding PV performances. Here, the influences of perovskite layer thickness, carrier density, bulk defect state, and defect density at both interfaces are examined. Additionally, the effects of operating temperature and back contact metal work function (WF) on PV outcomes are also evaluated. Furthermore, Nyquist plots and lattice mismatch calculations are introduced to analyze the charge recombination loss at both interfaces. The highest efficiency of 32.57%, along with fill-factor (FF) of 87.58 %, open circuit voltage (Voc) of 1.08 V, and short circuit current density (Jsc) of 34.36 mA/cm2 are achieved for the suggested structure after optimizing all the physical parameters. Moreover, a linear regression machine learning (ML) algorithm is trained to analyze the influences of physical parameters of the CH3NH3SnI3 perovskite layer on the efficiency of the proposed structure. Among the eight features, the highest relative importance of 28.72 % is determined for defect density, which influences the device performance profoundly. In general, these findings can assist researchers in PV technology to fabricate low-cost, incredibly efficient, and Cdfree solar cells based on the CH3NH3SnI3 perovskite layer.