That’s primarily via the PROs - ASCAP, BMI, SESAC.
E.g. ASCAP says
“Fortunately, most popular live-streaming platforms, such as YouTube, Facebook, Instagram Live, Soundcloud and Twitch are licensed by ASCAP”
I’m assuming because DJ performances via twitch are considered non-interactive streaming they - like Pandora’s free tier - don’t need a mechanical licence, at least in the US.
How that then translates to other territories though I’m not entirely sure. In Europe I’m pretty sure they’d need to have a mechanical licence in place whether or not they are interactive.
My only concern is that actually the big guys get the big cut, and the DJ and the original artists (that are not wildly popular) the shortest end of the stick.