The new era of IoT brings the necessity of smart synergy for diverse communication and computation entities. The two extremes are, on the one hand, the 5G Ultra-Reliable Low-Latency Communications (URLLC) required for Industrial IoT (IIoT) and Vehicle Communications (V2V, V2I, V2X). While on the other hand, the Ultra-Low Power, Wide-Range, Low Bit-rate Communications, such as Sigfox, LoRa/LoRaWAN, NB-IoT, Cat-M1, etc.; used for smart metering, smart logistics, monitoring, alarms, tracking applications. This extreme variety and diversity must work in synergy, all inter-operating/inter-working with the Internet. The communication solutions must mutually cooperate, but there must be a synergy in a broader sense that includes the various communication solutions and all the processing and storage capabilities from the edge cloud to the deep-cloud. In this paper, we consider a non-orthogonal multiple access (NOMA)-based device to device (D2D) communication system coexisting with a cellular network and utilize Greedy Asynchronous Distributed Interference Avoidance Algorithm (GADIA) for dynamic frequency allocation strategy. We analyze a max–min fairness optimization problem with energy budget constraints to provide a reasonable boundary rate for the downlink to all devices and cellular users in the network for a given total transmit power. A comprehensive simulation and numerical evaluation is performed. Further, we compare the performance of maximum achievable rate and energy efficiency (EE) at a given spectral efficiency (SE) while employing NOMA and orthogonal frequency-division multiple access (OFDMA).