In summary, optimizing the thickness of the HTM, absorber, and ETM layers is critical for balancing charge transport, recombination, and light absorption. The optimized thickness values for the V2O5 HTM (0.035 µm), CsSnI3 absorber (0.275 µm), and WS2 ETM (0.015 µm) yielded the best performance, achieving an efficiency of 23.43% with improved charge collection and reduced losses.