We present new observational constraints on the elastic scattering of dark matter with electrons for dark matter masses between 10 keV and 1 TeV. We consider scenarios in which the momentum-transfer cross section has a power-law dependence on the relative particle velocity, with a power-law index $n in {-4,-2,0,2,4,6}$. We search for evidence of dark matter scattering through its suppression of structure formation. Measurements of the cosmic microwave background temperature, polarization, and lensing anisotropy from textit{Planck} 2018 data and of the Milky Way satellite abundance measurements from the Dark Energy Survey and Pan-STARRS1 show no evidence of interactions. We use these data sets to obtain upper limits on the scattering cross section, comparing them with exclusion bounds from electronic recoil data in direct detection experiments. Our results provide the strongest bounds available for dark matter--electron scattering derived from the distribution of matter in the Universe, extending down to sub-MeV dark matter masses, where current direct detection experiments lose sensitivity.