We buy music on various sites like iTunes, Beatport, Amazon,… your pick.
Some are in a DJ pool like DJcity etc. where you pay a flat fee.
If you are a user of the full version of Serato DJ and registered on their website you can go to whitelabel and download music legally for free.
This site does not allow piracy or sharing of music and no professional DJ would ever do so, as we are artists as well and do not want our work pirated.
Also a music collection does not need to be big. Most club DJs have 1000 songs tops in their active library and even many mobile DJs have under 2000.
Rule of thump is that if you need to buy more than 10 songs a month, you are either just starting out, or doing it wrong.