Thousands & thousands of years ago when Humans appeared on Earth, the Human population was small, & most population centers congregated near RIVER sources, as Humanity needed water to survive.
However, as time went by & the Human population grew, such critical water sources became contaminated in time. Dead carcass of animals & Humans were thrown into rivers & those caused much water borne diseases. Even in modern times, would anyone dare drink from the river Ganges, such as when covid infected dead Humans & animals were dumped into the river & cause the spread of covid to Billions?
There were NO such things as Water Treatment plants in ancient times, nor did our ancestors had the scientific & technology EDUCATION to produce such, as education was NOT compulsory until this modern century.
The only closest thing to tech & science was boiling of water or FILTRATION methods, either taught to the few or discovered on their own thru observation 2023 yrs ago, as well as the benefits of Alcohol that would kill germs, & thus wine was produced & touted as a safe drink, along with the use of grapes for taste & nutritional benefits. It spread thru trade amongst our ancestors, from Rome to China & every other nation in between, so long as it is taken in Moderation & with alcohol content control by winemakers.
However, by 700 AD, in the time of the LAST Prophet Muhammad in Arabia, he saw the sad results of HIGH Alcohol content in such supposed 'safe' drinks, as there were NO FDA checks or controls back then, & UNSCRUPULOUS greedy merchants INCREASED the alcohol content to HARMFUL levels - 95% proof alcohol content that would kill most Humans if taken on a drinking binge, if not after killing their own family & friends, as before Islam teachings, they were barbaric in nature & easily enraged.
Thus the prohibitation on alcoholic drinks for Muslims.
However, as Humanity progressed in science, tech, health & social economic needs as well as EDUCATION, alcohol content had been greatly reduced, eg - beer only 4%, whiskey 45% & only drunk with ice, never raw, along with heavy penalties should a drunkard cause harm to society.