Eugenics is the practice of forced “genetic hygiene.” Put another way, eugenics involves preventing “undesirable” people from reproducing. This can include forced sterilization, social pressure, institutionalization and even murder. Medical professionals, and, far worse, politicians and judges, used the language of Darwin to suggest that the “feeble-minded” would overwhelm the productive through breeding. The idea improperly used evolutionary biology while ignoring the complexities of genetics. There is no scientific basis that honestly supports eugenics.
I don’t understand what you mean by separating science from society. Scientists, like all people, are members of the societies they inhabit. Separation is not possible. It is, however, possible to differentiate science from eugenics. I’ll relate the definition of “science” as the use of the scientific method to hypothesize, test, and draw conclusions on the basis of careful experimentation. Eugenics, while practiced by some medical professionals, was largely an elitist, social idea that fed the vanity of the intelligentsia and the politically powerful. Because eugenicists conveniently ignored known scientific data thereby deviating from the scientific method, eugenics had the trappings of science but was not a scientific endeavor. Rather, it was a crusade.
Eugenics is a cautionary example illustrating the tendency of the elite to find meaning in moral crusades. In service of the eugenics crusade, a limited number of doctors, politicians, judges, and wealthy citizens caused irreparable harm to thousands. In the national-socialist world of Nazi Germany, the ideas led to the rationalization of genocide. Mistrust of similar crusades dressed up in the trappings of science is both warranted in our society and necessary to avoid tragedy.