The USA has won more Nobel prizes in Science than any other country. Certainly some of these great scientists were immigrants who came from different parts of the world, especially Europe, but America has one of the greatest universities in the world. These universities encourage their professors to conduct research by keeping their teaching duties light, and of course the government helps because we give out generous research grants. Without these grants, research would be very difficult if not impossible.
Many scientists come to the USA because it is a diverse country. Europe was the leader in scientific research in the early 20th century when the USA was still developing, because back then Europe had the greatest universities in the world. Germany was not unique in producing great scientists. Many great ones came from different parts of Europe. In comparison, there are few great universities in the rest of the world because they were and are not as rich as Europe or the United States. Some of the greatest scientists in history were not Germans. Issac Newton, Aristotle, Archimedes, Leonardo Da Vinci, Galileo, Kepler, Charles Darwin and Nicolaus Copernicus for example were not all Germans. Europe has had a history of great scientists through the ages. What is different in Europe is that scientists there share their results, and publish their work so they learn from each other. The USA and the rest of the world have adopted this free exchange of ideas.
Of course, intelligence also makes a difference. Humans evolved in Africa and Europeans and Asians had ancestors who migrated out of Africa about 60,000-70,000 years ago. Since then, there has been a mutation that happened about 40,000 years ago in Asia, and that mutation was so advantageous that it spread quickly all over the world, except in Africa south of the Sahara Desert. That mutation changes brain size. If we map brain size, we find that people who live near the Arctic, where contemporary Europeans evolved have the largest brain sizes, along with the people in northern Asian countries such as China, Japan and Korea. Indeed, some of the recent Nobel Prize winning scientists now come from north Asia. The reason an increase in brain size is advantageous is that if people live in places where there is little food, they have to think hard and figure out where to find food to survive. Humans no longer need to do that, but we instead now use it to either become great scientists, great merchants, or great thieves.