In his definitive work on comparative slavery Slavery and Social Death, the sociologist Orlando Patterson identifies eight ways in which throughout out the world and throughout history people have become slaves:
1) Capture in warfare
2) Kidnapping
3) Tribute and tax payment
4) Debt
5) Punishment for crime
6) Abandonment and sale of children
7) Self-enslavement
8) Birth
All eight of these methods are attested to in both Greek and Roman history, although that obviously does not imply that each method provided a similar number of slaves. Indeed, some of these methods are only obscurely attested, such as a period in the 2nd century BCE where Rome collected slaves and tribute. The Athenian lawmaker Solon famously outlawed the enslavement of Athenian citizens.
There was a lively exchange of articles between the Roman historians Walter Harris and Walter Scheidel on the subject of the quantity of slaves captured in war compared to the number enslaved at birth. They, in the way that you can imagine and Englishman and an Austrian disagreeing with each other, were arguing over was whether or not there had been a significant shift in the sources of slaves from the Roman Republican period and the Roman Imperial period.
For the Roman Republican period was marked by their conquest of a number of empires, such as the Carthaginians and the Greek empires of the East. During the Imperial period, while there were numerous border skirmishes with Gauls and Germans, and also an expedition against the Parthians, there was no continuous wars of sizes comparable to the Republican period. A lack of wars means a lack of slaves captured in war, meaning that the slaves had to come from somewhere else. Scheidel used demographic models to argue that it was entirely possible for the slaves captured during the Republican period to reproduce and therefore supply Rome during the Empire. Harris argued that we can easily assume that a combination of the other methods of capture were necessary to supply the demand created by the absence of war.
Given the acceptability of infanticide in both Greek and Roman culture (curiously something that even they recognized made themselves different from the surrounding cultures), the number of abandoned children in antiquity was quite high. And as Harris points out, where some families would see a certain baby as unacceptable child, others would see a potential slave.