American subs carried enough firepower to battle to get the job done. U-Boats were always crippled by a lack of torpedo tubes. Americans were very good at copying captured German torpedoes: so good they copied their defects too! The Germans fixed theirs long before we did. American subs because of their conning towers, were deeper at periscope depth and so less likely to broach the surface, bringing quick death to all on board.
Finally, American subs produced victory, where it is very debatable whether German subs helped or hurt their war effort. I am inclined to come down on the theory that the use of German subs necessitated fighting the United States, and that was the end of the war for the Germans. The submarines also made them fight the British, and the Germans may not have had to fight them either. In any event, the German submarines did not produce victory. The American ones did.