The application of the Internet of Things (IoT) in wireless sensor networks (WSNs) poses serious challenges in preserving network longevity since the IoT necessitates a considerable amount of energy usage for sensing, processing, and data communication. As a result, there are several conventional algorithms that aim to enhance the performance of WSN networks by incorporating various optimization strategies. These algorithms primarily focus on the network layer by developing routing protocols to perform reliable communication in an energy-efficient manner, thus leading to an enhanced network life. For increasing the network lifetime in WSNs, clustering has been widely accepted as an important method that groups sensor nodes (SNs) into clusters. Additionally, numerous researchers have been focusing on devising various methods to increase the network lifetime. The prime factor that helps to maximize the network lifetime is the minimization of energy consumption. The authors of this paper propose a multi-objective optimization approach. It selects the optimal route for transmitting packets from source to sink or the base station (BS). The proposed model employs a two-step approach. The first step employs a trust model to select the cluster heads (CHs) that manage the data communication between the BS and nodes in the cluster. Further, a novel hybrid algorithm, combining a particle swarm optimization (PSO) algorithm and a genetic algorithm (GA), is proposed to determine the routes for data transmission. To validate the efficacy of the proposed hybrid algorithm, named PSOGA, simulations were conducted and the results were compared with the existing LEACH method and PSO, with a random route selection for five different cases. The obtained results establish the efficiency of the proposed approach, as it outperforms existing methods with increased energy efficiency, increased network throughput, high packet delivery rate, and high residual energy throughout the entire iterations.