The spelling rule is quite simple. Use the OU spelling in the middle of the word and use the OW spelling at the end of the word.
Now you are probably thinking about all the exceptions to the rule. Interestingly, they range from none to many. In the eighty or so commonly used words that contain OU and have this sound, the only word that ends in OU is thou, which is a word that is not commonly used these days. So we can say no exceptions exist to that part of the rule.
As for the words that end in OW, most of them have the OW sound found in snow, throw, and low. Those that have the OW sound as in cow are not as many and are evenly divided into small groups. About a dozen short words like plow, how, and allow obey the rule. What else can we find?
Fewer than a dozen words end in OWN, such as brown, town, and down. Even fewer words end in OWL: growl, scowl, howl. About a dozen miscellaneous words like browse, powder, and towel use OW in the middle.
These exceptions to the rule are the historical oddities. Few if any of the original words were spelled with a W. They were mostly spelled with a U, but over the decades they have changed both their shape and sometimes their sound. A prime example is in Chaucer’s Canterbury Tales, which was written circa 1400. In the very first line, we read the word shoures (showers
Whan that Aprille with his shoures soote,
The droghte of March hath perced to the roote,
When April with his showers sweet
The drought of March has pierced to the root….