Thinking about it myself, I figured that maybe if a ship went through a big storm before coming to shore they would warn the people that live in the surrounding area, but that doesn't seem quite right. Was it just random chance that they didn't get destroyed or was there a way to know if something was coming besides the obvious watching from a tower?
There was really no way to forecast storms for most of human history. People recognized seasons, of course. There's a hurricane season, a monsoon season, a tornado season, when such events are commoner. But other than that there was no way to predict a storm until it became visible over the horizon or until its effects were felt from a distance (patterns of waves at sea, bands of rainfall preceding hurricanes, etc.).
Yes, ships might randomly encounter storms at sea and rush home to report them. But even if they made it to port, they couldn't predict storm tracks. Just because you see a storm at sea doesn't mean you know where it's going or if it'll make landfall.
Before the days of computer models, storm track prediction depended on two things: having a great many observation stations spread across the globe, and having a fast means of communication between them. The fast means of communication came with the invention of short wave radio, and the observation stations came with WW2.
Land stations were not a problem, but most hurricanes develop over the ocean, out of sight. The obvious solution was to station ships at defined spots across the ocean, and have them stream observations to central weather bureaus. This became a thing during WW2, specially over the north Atlantic and north Pacific. The Russian convoys from Halifax in Nova Scotia to Murmansk in Russia faced very severe storms. Contrary to what one may think, the purpose of storm prediction wasn't to avoid storms, it was to skim them. Pass far enough away to spare damage, but close enough for high waves to protect from German U-Boats.
These weather ships took a heavy toll from German guns during the war and many were sunk. But the system worked well enough that after the war, the International Civil Aviation Organization (ICAO) persuaded governments to launch a large number of weatherships across the Atlantic and Pacific. This began in 1948 and continued for the next several decades.
Weatherships were permanently stationed at assigned spots in the oceans, and periodically relayed weather conditions to shore. Along with a network of land based stations all connected by radio, they would warn about the development of low pressure centers, report hurricanes, try to follow hurricanes and take measurements to predict their course.
In the 70's, ICAO began replacing the weatherships with permanently stationed weather buoys. No new weatherships have been launched since 1985, but weather buoys continue to be replaced and serviced.
In more recent years, satellites have taken over the job. They can observe large areas constantly, measure wave height and surface temperature and lots of other variables and feed the information to computer models. Most countries have national weather bureaus with aircraft that fly into hurricanes to measure local variables.
But for the bulk of human existence, storms were unpredictable.