How do you get more harpoons?
There is no way to purchase more harpoons when you run out; harpoons replenish whenever you start a new activity that requires them (whale hunting, for example). If you ran out of them, that's it, try again next time.
You can, however, increase the amount of harpoons you start with through crafting, in specific, under Jackdaw upgrades. You can also increase harpoon damage (meaning you have to use less harpoons) and rowboat armor (allows you to tank more rams from the beasts you're hunting). Do note that the Harpoon Strength upgrade requires you to find one of the buried chest, namely #18.