Answer:
The piece of legislation that made it illegal to publicly denounce the war verbally or on paper was The Sedition Act of 1918.
Step-by-step explanation:
This act was an extension of the Espionage Act of 1917 and seeked to cover a broader range of offences concerning the use of freedom of speech to criticise the government involvement on war, the USA flag or its armed forces, the war effort or the sale of government bonds. The main objective was to avoid others to see the American government in contempt for their war effort during WWI.
It was signed into law by President Woodrow Wilson on May 16, 1918