In this paper, a secure uplink non-orthogonal multiple access (NOMA) internet of things (IoT) system using an energy harvesting unmanned aerial vehicle (UAV) is studied. The communication protocol includes three phases: The first phase is an energy harvesting phase in which the IoT devices and UAV relay harvest radio frequency energy from a power beacon. The second phase is information transmission from IoT devices to a UAV relay. The third phase is relaying transmission from the UAV relay to the base station. Furthermore, a UAV eavesdropper (UE) wiretaps the signals from the IoT devices and UAV relay in the second and third phases. For this system, we derived the closed-form outage and intercept probabilities to evaluate the system and secrecy performances. The constrained optimization algorithm for minimizing the outage probability is then deployed to obtain training data. Finally, a deep learning model is trained to predict the optimal configuration parameters, enabling rapid adaptation to environmental conditions.