Why did America use atomic bombs to end WWII with Japan but not do the same to end the war with Germany?
Neither. Germany surrendered at the beginning of May 1945. The Trinity test was conducted in July 1945. The US dropped Little Boy without testing its design (it was simpler and there was much less doubt about whether it'd work), but it was completed in July as well. By the time the US had nuclear weapons, Germany had surrendered, and it's considered in poor taste to bomb the cities of a country you are no longer at war with. Even before Germany surrendered, it was clear that that war was just about over and so there's no point using one of your handful of nukes there.
There were possibly some other considerations. In 1943 when they first thought about targets (but before anyone had any firm ideas on anything), they suggested that if the bomb did not work then Germany (which was known to be working on nuclear bombs itself) might be more likely to study the bomb and figure out how to build their own bomb. Also, the only American bombers that could take a nuclear weapon were B-29s (it was not a small bomb), and B-29s were deployed exclusively to the Pacific. Deploying them to Germany was tantamount to saying "Hey! Shoot me down! I'm interesting and something you want to study!" But the main factor was just that by the time they got around to really thinking about targets, Germany was about to surrender/had surrendered.