One of the main points of the Treaty of Versailles was to weaken Germany so that it could not threaten France again. It did this in a number of ways.
One somewhat indirect way it did this was by imposing reparations on Germany and by taking the output of many of its coal mines to make up for the destruction of French coal mines. These things weakened the German economy. When a country’s economy is weak, it is hard for it to be a military power.
There were also more direct ways in which the treaty tried to restrict Germany’s ability to attack France. The treaty demilitarized the Rhineland. This meant that it would be harder for Germany to attack France and easier for France to attack Germany. More importantly, the size of the German army was severely limited. The army was also banned from having tanks, armored cars, and other offensive weapons. Germany was not allowed to have any sort of an air force. All of these provisions in the Treaty of Versailles were meant to make it impossible for Germany to invade France again.