Germany was one of the world leaders in science and technology in the early 1900s all the way up to WWII
One of the greatest ironies of WWI is that going into the war, British and French propellants and explosive charges for artillery made extensive use of synthetic chemicals purchased from Germany, while German artillery propellants relied on guano from South America. The British Navy immediately choked off German supplies of foreign guano (and obviously France and Britain could no longer purchase German chemicals) leading to the so-called "shell crisis" that afflicted all sides with severe artillery shortages after the first few months of the war exhausted their stockpiles.
"Fortunately," all the combatants quickly found substitutes and ramped up production, allowing them to slaughter each other in enormous numbers for years more. Another fun fact: during WWI, approximately 260 artillery shells were fired for each soldier killed (and only about 2/3 of all dead soldiers were killed by artillery).
Fun fact: in both world wars, Germany was absolutely dependent upon Swedish iron ore to produce high-quality steel. In WWI, it was only the High Seas Fleet of battleships and battlecruisers that prevented the Royal Navy from sailing into the Baltic and choking off this supply and ending the war (an under-appreciated reason for Germany building all those capital ships in the first place while being generally unwilling to risk losing them all in a major fleet engagement). In WWII, it was Hitler's quick occupation of Norway and the Luftwaffe that preserved the supply of Swedish ore.
Germany was also critically dependent upon Swedish ball-bearings, but at least Sweden sold those to both sides.