Given the resource limitations of wireless sensor networks (WSNs), energy conservation is of utmost importance. Moreover, minimizing data collection delays is crucial to maintaining data freshness. Additionally, it is desirable to increase the number of collected data samples to enhance accuracy and robustness in data collection. For this purpose, this research article proposes a clustering-based routing protocol aimed at maximizing the delivery of data samples while minimizing energy consumption and data collection delays. The protocol employs a scattered search algorithm and fuzzy logic to cluster the sensor nodes. By considering the distance to the sink and the remaining energy level of the battery, the network is dynamically divided into clusters using a lightweight clustering approach. To evaluate the effectiveness of the proposed method, simulations were conducted in OPNET using the AFSRP protocol. The results demonstrate superior performance of the proposed method in terms of end-to-end delay by 13.44%, media access delay by 75.2%, throughput rate by 20.55%, energy consumption by 13.52%, signal-to-noise ratio by 43.40% and delivery rate of successfully sending data to the sink is 0.21% higher than the well-known AFSRP method.