Perovskite solar cells (PSCs) are solar cells that have intriguing characteristics such as environmental friendliness and the capability for high power conversion efficiency, which have attracted study from both scientific investigation and analytical standpoints. However, lead toxicity has become a significant barrier to the widespread use of PSCs. Due to the serious environmental implications of lead, an environmentally compatible perovskite is required. Tin-based perovskite has a considerable impact, showing that it is a good hole extraction material with good mobility and low effective mass. In this study, we explore the impacts of perovskite and hole transporting layer (HTL) thickness, and intensity of light limitations, in inverted PSCs based on the structure of FTO/NiO/MAPbI<sub>3</sub> /ZnO/Ag and FTO/NiO/MASnI<sub>3</sub> /ZnO/Ag incorporating GPVDM (General-purpose Photovoltaic Device Model) to evaluate if MASnI<sub>3</sub> is a viable substitute to MAPbI<sub>3</sub>. From the simulation results, the optimized parameters obtained for PCSs under 1 sun incorporating MASnI3 were 27.97%, 0.88 a.u., 0.92 V, and 34.45 mA/cm<sup>2</sup>. Instead, the optimized parameters obtained for PCSs incorporating MAPbI<sub>3</sub> were 24.94%, 0.88 a.u., 0.90 V, and 31.03 mA/cm<sup>2</sup>. The thickness of the film of both PSC architectures was optimized to provide the best suitable result. The findings show that MASnI<sub>3</sub> is employed as a promising perovskite layer in PSCs instead of MAPbI<sub>3</sub>.