A lot of historians refer to the two world wars as one world war. In other words, they say it was all one war with a 20 year peace in between. So, that means that WWI had a great deal to do with WWII.
After WWI, Germany was treated very badly by the Allied Powers in the Treaty of Versailles. They had land taken away from them and were forced to pay reparations to other countries, among other things.
This made Germans very angry. They felt they were being unfairly picked on. This helped Hitler come to power because he promised to make them strong again so they could avenge the insults from the Treaty.
So Germany started WWII largely out of anger about the treaty that ended WWI.