The 18th Amendment was an amendment to the US Constitution that was passed during the Progressive Era. The Progressive Era was a period in American History where the middle-upper class rose to power and decided to make a series of changes so they could solve a series of problems that existed since the Industrial Revolution in America.
Some changes during the Progressive Era were indeed very needed, such as the education reform, others were not, and one of them was the passing of the 18th Amendment which established the prohibition of intoxicating liquors in the US.
The prohibition was the result of the temperance movement that was also a part of the Progressive Movement, the temperance movement believed that poverty and societal issues such as violence were caused by alcohol.
The prohibition caused more problems than solutions, in the end, it led to the emergence of organized crime such as the mafia.