Did The Eighteenth Amendment prohibited the buying and selling of liquor?

Yes, you are correct. The Eighteenth Amendment to the United States Constitution, ratified in 1919, prohibited the manufacture, sale, transportation, importation, and exportation of alcoholic beverages.

This amendment was known as Prohibition and was in effect from 1920 to 1933, when it was repealed by the Twenty-First Amendment.