The OP asked about US versus Germany - and the US really didn't use subs for much more than sneaking people in and out of places in Europe. Too close to land based aircraft cover - which did serious damage to subs.
Pacific was a different story entirely. Even then, the US was kind of late to the Sub development party at the beginning of the war - but as with most elements of technology and manufacturing during WWII, quickly made up ground.