With the increasing complexity of ocean missions, using multiple unmanned underwater vehicles to collaborate in executing tasks has become an effective way to improve the overall efficiency of ocean operations. Current research on path planning for multiple unmanned underwater vehicles mainly focuses on the basis of particle models or fully known environmental information, while research directions mainly focus on single indicators such as completion time and energy consumption. This paper first constructs a UUV model and a task scenario with detection success rate as the objective function. Then, a parameterization method based on a spiral search path was proposed for designing variables. A hierarchical control strategy is designed to ensure handle formation constraints. A general optimization framework for task scenarios has been constructed and combined with algorithms to solve optimization problems. Finally, this study compared and analyzed the performance of different optimization algorithms under the optimization framework, evaluated the optimization results of different search strategies, and explored the impact of dynamic objectives on the detection success rate. The results showed that the optimized path had a search success rate that increased by more than 50% compared to the direct path and the cover search path, which verified the effectiveness of the proposed method and strategy.