In this paper, a solar cell based on WO3/CdTe heterojunction was analyzed and optimized, for which the following structure of the Al/AZO/WO3/CdTe/NiO/Ni device was proposed, which was numerically simulated by the SCAPS 1-D software. Using the software, the effect of the thickness and carrier concentration of the absorber layer (CdTe) and the window layer (WO3) was analyzed, and the optimal value of these parameters was found to be 2 µm and 1015 cm−3 for the CdTe layer and 10 nm and 1019 cm−3 for the WO3 layer, respectively. The influence of the defect density of the WO3/CdTe interface on the performance of the proposed cell was also analyzed, simulating from 1010 to 1016 cm−2, obtaining better device performance at lower interface defect density. Another parameter analyzed was the operating temperature on the photovoltaic performance of the device, observing that the solar cell has a better performance at lower temperatures. Finally, a maximum optimized PCE of 19.87% is obtained with a Voc = 0.85 V, Jsc = 28.45 mA/cm2, and FF = 82.03%, which makes the WO3/CdTe heterojunction an interesting alternative for the development of CdTe-based solar cells.