Abstract: This research explores with a specific focus on smart city applications, how to optimise the execution of Web of Things (IoT) networks by utilising breakthroughs in Low-Powered Wide Area Networks (LPWAN). As IoT devices proliferate and generate vast amounts of data, having a competent network becomes essential, especially when dealing with low device thickness and limited power availability. This analysis provides a detailed energy consumption model tailored to LoRaWAN, based on a deeper understanding of its functional components in Internet of Things scenarios. The review uses MATLAB for replication and looks at two clear scenarios: the standard allocation of spreading factors without optimisation and an improved method that uses particle swarm optimisation (PSO) for dynamic spreading factor work. The results show that the network energy consumption dropped significantly, from 6.3997×10^ (- 17) Joules to 2.5230×10^(- 17) Joules, along with increased throughput, decreased parcel misfortune, and decreased idleness. Through a detailed analysis of several parameters, such as network density and data transfer efficiency, this study demonstrates the feasibility of the suggested optimisation model in terms of improving battery efficiency and overall network performance. Finally, the findings demonstrate how efficient LPWAN systems may provide robust and useful IoT environments, which are essential for the successful implementation of smart city initiatives.