A green, plant extract-mediated synthesis technique utilizing the Aloe vera stem extract with Zinc acetate (Zn(CH₃CO₂)₂·2H₂O), and Tungsten chloride (WCl2) salt has been employed to grow Zinc Oxide (ZnO) and tungsten doped ZnO (W-ZnO) nanoparticles (NPs). The formation of NPs was confirmed by FESEM with EDX and TEM analysis. The synthesized NPs have been employed for fabricating ZnO and W-ZnO thin films and the electro-optical properties of the films have also been investigated in detail. The thin films have obtained via spin coating and followed by annealing at 350 °C for 3 h in an ambiance atmosphere. The films showed smooth surfaces with a bandgap of 3.20 and 3.25 eV for ZnO and W-ZnO respectively. Finally, a novel structure inverted perovskite solar cells (PSCs) has been numerically analyzed utilizing the films as an electron transporting layer (ETL) for realizing the device performance. The highest PCE of the device for synthesized ZnO and W-ZnO has been found to be 21.16 % and 23.61 %, respectively. All of the findings show that the W-ZnO film is more suitable for the fabrication of PSCs than the ZnO film. In a nutshell, the synthesis of W-ZnO NPs employing green and eco-friendly methods, mediated by Aloe vera extract as the reducing agent, offers in this study a novel approach to enhancing solar cell efficiency with the simple spin coating fabrication technique.