Pretty much all professional DJs still buy and download music - the only exception is if they are a hardcore vinyl DJ, love CDs, or just want to use streaming services.
In most cases, the best option for DJs is to build up a large collection of downloaded music. This can then be used anytime using some DJ software.
That said, it doesn't have to be this way - only if you want to mix in a club. For example, with DJ.Studio you can mix music from YouTube or YT music.
This means there is no need to download any tracks, and you can start creating mixes with any song on youtube. While you can't legally record and distribute these mixes, it's a great way to experiment with songs you might want to include in a DJ set without needing to buy it first!