I wasn't sure whether this belongs in here or AskAnthropology but I figured I'd try here first! I recognize race is pretty much a gigantic grey area and not an exact science at all, however in general, we can often see a trend of similar physical characteristics of people from the same area. Do we know when these distinct ethnic groups formed? Or when we started differentiating between them?
I think this really is a more anthropology question looking into prehistory archaeology. we know by the time Sumerians wrote stuff down there were Amorites, Elamites, people the Persian gulf (Dilminki?) and the Indus River, etc.
I am not an anthropologist but every unique collection of artifacts is named "The X culture" so we know about different material cultures and even some ritual behaviors. so say the Natufian culture lived in round dome huts, whereas the people of Çatal-höyük liked in mud brick structures so close they had to enter through the roof. so short answer- as soon as there were humans they had unique material culture and symbolic culture therefore there has always been "ethnicity".
whether this mean anything to Neolithic and older people it's hard to know, but considering how contemporary ethnic groups treat the other I bet they had a distinct sense of uniqueness.
As far as physical differences, if I'm not mistaken, there are H.erectus specimens that exhibit racial features in Asia and Europe even before Homo sapiens.