The Internet of Things (IoT) has the potential to revolutionize the way we work by incorporating essential end devices (ED) into connected all smart devices. Low-power wide-area networks (LPWANs) determine the maximum number of end devices (EDs) supported by the network and distribute data through these EDs. However, the delay and action of space are inefficient. However, implementing and training a Double Deep Q Learning (DDQL) network can be computationally intensive and involve a significant amount of data transmission, posing a risk to network security. While DDQL can optimize resource allocation based on the network, the proposed technique is essential for significantly improving actions and reducing the risk of transmitted data in LoRaWAN. It supports EDs while ensuring lower power consumption, thereby increasing network capacity. Although the proposed DDQL technique exhibits high performance compared to existing methods such as Hybrid Adaptive Data Rate (HADR), Low-Power Multi-Armed Bandit (LP-MAB) and non-destructive adaptive data rate (ND-ADR, it achieves outstanding results. The outcomes include an Energy Consumption of 0.02J, Packet Delivery Ratio (PDR) of 0.56 and a Packet Loss Ratio (PLR) of 0.72, surpassing existing methods in the context of IoT.