Nazi Germany employed various elements in their oppression of Jews, which were borrowed from different other countries, so that their policy not to seem exceptional for Germans.
They used elements of Medieval Europe
They used measures implemented in Tsarist Russia (not too far from the Nazi epoch)
They cited the US and British segregation policy as a justification
They provided parallels with the treatment of American Indians, especially, the reservations
As you know, Germany justified their pursuit for Liebensraum (living space in Eastern Europe) by comparing themselves with established colonial powers, that is Britain and France and claiming that Germany deserves similar rights. The practice of comparing Germany with the US, Britain and France was very widely used.
At the time, racial segregation was common in the US and in British colonies, so Germans thought such segregation would be justified for Germany as well.
Notice also the following. Germans used various legal tricks against the Jews, sometimes reaching the desired effect even without explicit racist legislation.
For example, they claimed that at the proclamation of the German Empire in 1871 there was a legal mistake, and the people of Jewish faith were not granted the citizenship. As such, all people who (or whose ancestors) had Jewish faith by 1871 were stripped of their citizenship. The legislation did not look racist at the surface because people of known Jewish ancestry whose ancestors converted to Christianity before 1871 were kept with full rights.
Note that the Baltic states currently use a similar legislation against Russians, that is all people who gained citizenship after 1940 were stripped of their citizenship, because in their view the incorporation in the USSR was illegal. (The Universal Declaration of Human rights in Article 15 forbids stripping people from citizenship, so one needs to find some "legal mistatke" in the past so to deprive a mass of people from their citizenship).
The marriages of Germans with Jews were forbidden but this also did not seem racist at the surface, because the agency which oversaw it also forbade marriages of say thin and thick, tall and short and so on - they justified it with a claim that marriages between too distant genes are detrimental, even within one race.
As to the ghettos, they were not implemented in 1938 yet, but when they were they were seen as a means of national self-determination for the Jews. Initially the ghettos were just Jewish districts where Jews enjoyed a high level of autonomy and self-government, up to law enforcement. This level of Jewish autonomy was not seen in Europe ever. This was quite in line with various projects for national self-determination in the USSR, say the recently-created Jewish Autonomous Oblast in the Far East in the USSR.
Note that the ghettos were officially called "Jewish districts", which was not seen as suspicious by many because Germans instituted similar ethnic districts for other people as well in many occupied areas, including the "German districts".
Only later the ghettos were sealed under various pretexts, mostly being claims of epidemics or need to protect the Jews from the non-Jewish population.
One should note that the Germans used similar approach to non-Jewish ethnic groups as well, take for example the ghetto-like Russian autonomy centered in Lokot (so-called "Lokot Republic"), which is viewed now by some Russian neo-Nazis as an example of on ideal national state.