The integration of non-orthogonal multiple access (NOMA) technology and cognitive radio networks (CRNs) promises to enhance the spectrum utilization efficiency of 5G and beyond-5G (B5G) mobile communication systems. In this article, a NOMA-based spectrum-sharing scheme is proposed for dual-hop CRNs in which a primary transmitter separated by a long distance from the primary receiver communicates via NOMA-based CRN. In this scenario, we mathematically formulate a constrained optimization problem to maximize the sum rate of all secondary users (SUs) while maintaining the total transmit power of the system. Inspired by the effectiveness of computational intelligence (CI) tools in solving non-linear optimization problems, this article proposes three CI-based solutions to the given problem aiming to guarantee quality of service (QoS) for all users. In addition, an enhanced version of the classic artificial bee colony (ABC) algorithm, referred to here as the enhanced-artificial-bee-colony (EABC)-based power allocation scheme, is proposed to overcome the limitations of classic ABC. The comparison of different CI approaches illustrates that the minimum power required by the secondary NOMA relay to satisfy the primary rate threshold of 5 bit/s/Hz is 20 mW for EABC, while ABC, PSO and GA achieve the same target at 23 mW, 27 mW and 32 mW, respectively. Thus, EABC reduces power consumption by 13.95% compared to ABC, while 29.78% and 46.15% power-saving is achieved compared to PSO and GA, respectively.