One of the greatest ways to guarantee that networks designed for fifth generation (5G) and beyond reach the required levels of spectrum efficiency (SE) is through nonorthogonal multiple access (NOMA). This work presents two new blockchain-based techniques that take advantage of massive multiple input multiple output in a single-cell network to improve performance. NOMA power domain is used in the 5G cooperative cognitive radio network (CCRN) to improve the SE of the downlink. This study investigates a novel cooperative NOMA-based CCRN for underlay spectrum sharing. A cooperative NOMA technique is proposed by considering the access modes of relays and secondary users (SUs) on the secondary network. The proposed system's performance is assessed with respect to random channel characteristics, frequency-selective Rayleigh fading and perfect successive interference cancellation (SIC). The first signal decoded by SU identifies the relay states with the best channel quality between users and the destination users to offset the bit error rate. The throughput dropped during the period because of the perfect SIC. The precise closed-form expressions for the system throughput of the secondary network are derived under the interference constraint of the primary network to evaluate the efficacy of the suggested cooperative strategy. The suggested approaches are assessed under various conditions using the MATLAB application by considering varying transmit power levels, power location coefficients and lengths. In every case, four users are assumed to be using a 90 MHz bandwidth and M-ary Quadrature Amplitude Modulation technology.