For semiconductor spintronics, efficient spin generation in semiconductor and spin transfer to ferromagnetic metal (FM) are essentially required. Two-dimensional electron gas (2DEG) of semiconductor quantum wells is a promising system for generating spin via the Rashba-Edelstein effect (REE) because of its strong inversion symmetry breaking. In this study, we investigate spin accumulation through REE and spin Hall effect (SHE) in the 2DEG of an InAs quantum well. We use spatial- and polarization-resolved measurements of spin, which reveals that REE dominates SHE in 2DEG. Furthermore, REE in 2DEG induces a spin-orbit torque on FM in a 2DEG/insulator/FM heterostructure. Using direction- and time-resolved measurements of FM magnetization, we determine a sizeable fieldlike torque, which is attributed to the phonon-mediated spin transport from 2DEG to FM.