What people already said. Most spells have very short ranges. When cannons enter the picture, best use of spellcasters is for defense, not offense. Wall of force to protect sails/masts, tiny huts to protect deck crew and similar stuff.
Even without cannons, balistae had ranges of 200-300 meter (650-1000 feet) for smaller mobile ones and 400-500 meters (1300-1600 ft) for bigger ones that were mounted on the ships. Also add catapults with ranges 150-300 meters for small ones to 300-500 meters for larger ones like Byzantines and Romans used. Compared to that, your fireball has measly 150 ft (50 meter) range. At best, fireball is more like blunderbuss with longer range ( blunderbuss is most effective at 30-60ft range, it's like early shotgun) and better damage.