Typically, there are a lot of challenges to be faced with providing better performance and energy optimization in the Internet of Things (IoT) in a smart city. In IoT and wireless sensor networks (WSNs), the nodes are generally grouped as clusters, which lead to forming Cluster Head (CH) that collects data from all other nodes and explicitly communicates with Base Station. In this paper, numerous objectives like delay minimization, energy sustainability could be accomplished through implementing a clustering algorithm on the intra-distance inter-distance between the CH and nodes. The optimization variables such as distance, delay, and energy used in IoT devices are taken into account to achieve the desired CH selection. In order to develop an enhanced IoT-Wireless Sensor Network (WSN) model, this paper introduces an advanced approach for CH selection using a modified Rider Optimization Algorithm (ROA). In the proposed algorithm, the solutions are sorted into two sets based on the best fitness value. The first set is updated using the averaged value of bypass and follower riders while the second set is updated through the averaged value of attacker and overtaker riders, which is called as Fitness Averaged-ROA (FA-ROA). The performance of the proposed FA-ROA is verified through a comparative analysis using various state-of-the-arts optimization models by concerning the number of alive nodes and normalized energy.