The people speaking Proto-Romanian, the ancestor of Romanian language, are thought to have lived in a rather small area, hence the distinctive lack of dialects of Romanian (with the exception of Aromanian and other southern dialects which have split around a thousand years ago).
The exact area where they lived is a matter of debate (and since this is Southeastern Europe, politics mixes with history), but generally it's thought to be around the mountainous regions of Transylvania and/or Banat.
These mountaineer Romanians were mostly shepherds and they were very mobile (with some exceptions, not quite nomadic, but close to it). They easily spread from the mountains of northern Greece to what is now Czechia.
The Slavs, on the other hand, traditionally inhabited the lowlands (their Urheimat was most likely in the plains of Ukraine-Poland-Belarus), so at first, there was little overlap in territory. They settled in small villages in the steppes and still-forested plains.
An increase in the Romanian population meant they began to settle downwards, in the plains. In Romania, the population density of the plains was still very low, meaning that assimilation by the Romanians was easily done. In other areas (Slovakia, Bulgaria, Bosnia, Croatia, Montenegro), the Romanians were relatively few in number compared to the Slavic population, so the assimilation was the other way around.
Even to this day there are pockets of "Vlachs" (Romanian and Aromanian-speaking people) across the Balkans who are still shepherds. In some languages (including Greek), the word "Vlach" is synonymous with "shepherd".