No shit ranged weapons were good for warfare but producing good arrows and bows was expensive and most of the time it was needed more for hunting rather than fighting. Plus it doesn’t work against shielded formations. The spear is still the undoubted king of weapons as a cheap and hugely effective way to outfit an army.
One handed flails were never used in warfare. They were made for decoration. There was a 2 handed flail that couldn’t reach the user but it was still not very effective.