Yes, that’s right. Ancient societies divided people by appearance, origin, language, culture. Then, generally, they used those divisions to establish separate legal categories.
In many ancient cultures, including American ones, the key division was “us” and “everyone else.” You’re either Hellenes or barbaroi. You’re either “real human beings” - most Native Americans’ term for their tribe - or you’re not.
The idea of “race” as something determined by DNA, however, is modern.
True, but it wasn’t until relatively recent in history that we could see the whole picture, before we were only seeing different parts of the world. After the circumnavigation of the globe the larger picture became clear.
In my opinion there are 3 primary races (European, Asian, African) and then simply different percentage blends of the three establish the basis all of the others. ie. middle eastern people are a blend of all three, Mediterranean peoples are mostly white with a touch of African, SE Asians are mostly Asian with a touch of African, ect.