The Internet of Things (IoT) has significantly impacted human life in recent years, enhancing quality of life and transforming various commercial sectors. The sensor nodes in the Internet of Things (IoT) are interconnected in order to facilitate the passage of data to the sink node over the network. Due to the constraints of battery power, the energy in the nodes is preserved through the utilization of the clustering technique in the Internet of Things (IoT). Choosing a cluster head (CH) is crucial for prolonging the lifespan of the network and increasing its throughput in the process of clustering. Recently, numerous optimization techniques have been modified to choose the best CH in order to enhance energy use in network nodes. Therefore, using incorrect CH selection methods leads to longer convergence times and faster depletion of sensor batteries. This research proposes a method that incorporates a CH selection strategy using the Jaya optimization method. The proposed methodology is evaluated against existing algorithms in terms of network longevity and energy efficiency. The simulation results indicate that the Jaya optimization algorithm-based CH selection scheme (Jaya-EEC) is much more effective in terms of network longevity compared to LEACH, LEACH-E, and PSO-C. Specifically, Jaya-EEC outperforms LEACH by 72%, LEACH-E by 64%, and PSO-C by 60%.