Stratospheric solar-powered high-altitude platform stations (HAPS) have recently gained immense popularity for their ubiquitous connectivity and resilient operation while providing/catalyzing advanced mobile wireless communication services. They have particularly emerged as promising alternatives for economic coverage of remote areas in the world. This makes them suitable candidates to meet the UN Sustainable Development Goals (SDG-2030) for global connectivity. HAPS can provide line-of-sight (LoS) communications to the ground users in its ultra-wide coverage area. We propose to divide these users into multiple user groups and serve each group with a high-density flexible narrow spot beam, generated by the phased array antennas mounted on HAPS, to achieve high data rates. We carry out the user association and power allocation in a downlink (DL) non-orthogonal multiple access (NOMA) scheme in each user group. To improve the system performance, a sum rate maximization problem is formulated by jointly designing user grouping, user association, beam optimization, and power allocation while guaranteeing the quality-of-service (QoS) for users with limited power budget. We further investigate the outage performance of the users with the proposed approach as compared to the traditional scheme. Our findings reveal the significance of the joint design of communication parameters for enhanced system performance, optimum energy utilization, and resource allocation.