I don't know whether you're asking "How did they do it?" or "How do we know they were better?", but I will try to answer the second question.
I went to the Nobel website sorted by affiliated university and counted the countries and years there (no guarantee that I didn't miscount or something).
I chose this source and not the Wikipedia list, because on the Nobel page, each researcher is only once and only Physics, Chemistry, Economy, and Medicine are counted.
Top Nobel-Prize winning Nations 1901-1930: Germany (28), UK (16), France (15), USA, Netherlands, Sweden (6 each).
Top Nobel-Prize winning Nations 1931 - 1960: USA (61), UK (23), Germany (22), Russia (6).
Top Nobel-Prize winning Nations 1961 - 1990: USA (128), UK (31), Germany (13), Switzerland (11).
Top Nobel-Prize winning Nations 1991 - 2015: USA (166), UK (20), France, Japan (14 each), Germany (12).
In this very limited view of research history, Germany seems to have been more prolific in research in the first third of the 20th century than the other countries.
Since the second third of the 20th century, the USA is the clear leader.
Because the linked question asked about the top universities, here they are:
Top Nobel-Prize winning Universities 1901-1930: Sorbonne University, Paris, France (6),
Goettingen University, Göttingen, Germany (5),
University of Cambridge, Cambridge, United Kingdom (4),
Berlin University, Berlin, Germany (4),
Munich University, Munich, Germany (4).
Top Nobel-Prize winning Universities 1931 - 1960: University of California, Berkeley, CA, USA (7),
Columbia University, New York, NY, USA (7),
Harvard University, Cambridge, MA, USA (5),
University of Oxford, Oxford, United Kingdom (5),
University of Cambridge, Cambridge, United Kingdom (4),
California Institute of Technology (Caltech), Pasadena, CA, USA (4).
Top Nobel-Prize winning Universities 1961 - 1990: Harvard University, Cambridge, MA, USA (16),
Massachusetts Institute of Technology (MIT), Cambridge, MA, USA (10),
University of Cambridge, Cambridge, United Kingdom (7),
California Institute of Technology (Caltech), Pasadena, CA, USA (7),
Stanford University, Stanford, CA, USA (7),
University of Chicago, Chicago, IL, USA (7),
Rockefeller University, New York, NY, USA (7).
Top Nobel-Prize winning Universities 1991 - 2015:
Princeton University, Princeton, NJ, USA (9),
Stanford University, Stanford, CA, USA (8),
University of Chicago, Chicago, IL, USA (8),
Columbia University, New York, NY, USA (8),
Massachusetts Institute of Technology (MIT), Cambridge, MA, USA (7),
University of California, Berkeley, CA, USA (7).
Warning, pure speculation ahead!
My theory is that the possibility to travel played a role in this. At the beginning of the 20th century, we have Europe with its long research tradition and many established universities on one side of the Atlantic ocean and the USA with comparatively young universities on the other side. Crossing usually took weeks on a ship, so it was a bit more difficult for the american universities to hire great scientists and to participate in academic exchange.
This started to change when the first scheduled trans-atlantic passenger flights were offered in 1931. Nowadays, we can collaborate with any researcher in the world via skype, meet at conferences all across the globe, and moving across the atlantic for a postdoc doesn't mean that you won't get to see your family again for centuries.
For some less speculative reasons why the US outperformed Germany after 1930, see Richard Ericksons answer.