Currently, the performance of inorganic and non-toxic perovskite solar cells (PSCs) lags far behind that of organic and Pb-containing PSCs. To enhance the photovoltaic capabilities of inorganic and non-toxic perovskites, a fully inorganic RbGeI3/KSnI3 heterojunction without hole transport layer is proposed, and simulation and optimization are performed using SCAPS-1D software. Research findings indicate that the RbGeI3/KSnI3 perovskite heterojunction significantly improves the quantum efficiency compared to single-layer perovskite, and due to the more matched energy levels, it improves the electric field of the cell and is more conducive to the migration of photogenerated carriers, resulting in excellent device performance. Moreover, PSCs undergo optimization across multiple parameters, including materials for the charge transport layer, perovskite layer thickness, defect density, bandgap, operating temperature, and so on. This comprehensive approach involves analyzing changes in electric field, band structure, and recombination rate. Finally, the power conversion efficiency of the optimized device achieves 40.44 %, marking a significant 440 % increase compared to the 7.49 % efficiency of single-layer PSCs. This work proposes a heterojunction structure to create efficient inorganic and non-toxic perovskite solar cells, providing a novel strategy for further development in this field.