Recently, unmanned aerial vehicles (UAVs) have been used as flying base stations (BSs) to take advantage of line-of-sight (LOS) connectivity and efficiently enable fifth-generation (5G) and cellular network coverage and data rates. On the other hand, nonorthogonal multiple access (NOMA) is a promising technique to help achieve unprecedented requirements by simultaneously allowing multiple users to send data over the same resource block. In this paper, we study a UAV-enabled uplink NOMA network, where the UAV collects data from ground users while flying at a certain altitude. Unlike all existing work on this topic, this study consists of two stages. In the first stage, we use the well-known Particle Swarm Optimization (PSO) algorithm, which is a metaheuristic algorithm, to deploy the UAV in 3D space, so that the users’ sum pathlosses are minimized. In the second stage, we investigate the user pairing problem and propose a dynamic power allocation technique for determining the user’s power allocation coefficients, as well as a closed-form equation for the ergodic sum-rate. Results show our PSO-based algorithm prevailing over the Genetic Algorithm (GA) and random deployment methods. The proposed dynamic power allocation strategy maximizes the network’s ergodic sum-rate and outperforms the fixed power allocation strategy. Additionally, the results reveal that the best pairing scheme is the one that keeps uniform channel gain difference in the same pair.