Semiconductor transition metal dichalcogenides are a promising archetype for spintronic devices as they present several spin-to-charge interconversion mechanisms. Nevertheless, the microscopic origin of this interconversion is yet to be
established. Here, we report a comprehensive study of light-induced spin pumping in YIG/MoS2 heterostructures. In MoS2 monolayer microsized flakes, two distinct contributions to the spin current injection were identified. One from the metallic edge states and another from the 2D semiconductor states. A competitive interplay between the edge and 2D contributions was observed by changing the average flake size. We demonstrate that a light-driven spin current injection can enhance, attenuate, or even switch on/off the spin pumping depending on the size of the MoS2 flakes. The spin pumping in the MoS2 was independent of the film thickness, consistent with the inverse Rashba-Edelstein effect at the YIG/MoS2 interface. These findings highlight distinct contributions to spin pumping in transition metal dichalcogenides and open avenues for developing opto-spintronic device applications.