Due to the fact that network space is becoming more limited, the implementation of ultra-dense networks (UDNs) has the potential to enhance not only network coverage but also network throughput. Unmanned Aerial Vehicle (UAV) communications have recently garnered a lot of attention due to the fact that they are extremely versatile and may be applied to a wide variety of contexts and purposes. A cognitive UAV is proposed as a solution for the Internet of Things ground terminal's wireless nodes in this article. In the IoT system, the UAV is utilised not only to determine how the resources should be distributed but also to provide power to the wireless nodes. The quality of service (QoS) offered by the cognitive node was interpreted as a price-based utility function, which was demonstrated in the form of a non-cooperative game theory in order to maximise customers' net utility functions. An energyefficient non-cooperative game theory power allocation with pricing strategy abbreviated as (EE-NGPAP) is implemented in this study with two trajectories Spiral and Sigmoidal in order to facilitate effective power management in Internet of Things (IoT) wireless nodes. It has also been demonstrated, theoretically and by the use of simulations, that the Nash equilibrium does exist and that it is one of a kind. The proposed energy harvesting approach was shown, through simulations, to significantly reduce the typical amount of power that was sent. This is taken into consideration to agree with the objective of 5G networks. In order to converge to Nash Equilibrium (NE), the method that is advised only needs roughly 4 iterations, which makes it easier to utilise in the real world, where things aren't always the same.