###### Abstract
In addition, massive machine type communications (mMTC), ultra-reliable and low latency communication (uRLLC), and enhanced mobile broadband (eMBB) services will be more dominant in 5G and B5G networks. So, cellular network operators will face a challenge in managing the higher user density and resulting immense data volumes [1]. To fulfill the ever-increasing data demands, D2D technology is prominent not only in 5G but also in 6G. By adopting D2D communications, cellular operators can have several advantages in spectrum efficiency, latency, throughput, and energy conservation through sharing radio resources. In addition, public safety, proximity-based services (ProSec), group communication system enablers (GCSE), traffic offloading, and content sharing will be enabled by D2D communication [7]. However, to unlock the full potential of D2D technology, we need to address research challenges such as mode selection, neighbor discovery, mobility management, network security, interference and radio resource management, energy consumption, and the coexistence of small cells with D2D communications [8]. Among various challenges, interference management in cellular HetNets is one of the key factors influencing the system performance [7]. Overlay and underlay are the two main categories of D2D communication in terms of spectrum usage. In overlay D2D communication, dedicated radio resources are used for D2D communication, while in underlay D2D communication, the same radio resources are shared among conventional cellular users and D2D communications. Therefore, better spectrum efficiency can be achieved in underlay D2D communication at the cost of complex interference scenarios [1]. \begin{table}
\begin{tabular}{c l l l} \hline \hline
**KPI** & **4G** & **5G** & **6G (Possible)** \\ \hline User data rate & 150 Mbps & 1 Gbps & 100 Gbps \\ \hline DL data rate & 300 Mbps & 20 Gbps & \textgreater{}1 Tbps \\ \hline Latency for U-plane & 60 ms & 0.5 ms & 0.1 ms \\ \hline Latency for C-plane & 200 ms & 10 ms & \textless{}1 ms \\ \hline Spectral efficiency & 6 bps/Hz & 30 bps/Hz & 100 bps/Hz \\ \hline Frequency & 600 MHz–25 GHz & 3–300 GHz & upto 1 THz \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Performance comparison of 4G, 5G, and 6G mobile technologies. In Figure 1 D2D pairs, eNB and SCeNB share cellular resources to communicate with each other, introducing mutual interference among different tiers. Therefore, it is essential to manage interference to unlock the benefits of D2D communication in cellular networks. And resource allocation is one of the key factors for achieving this. In such an underlay D2D-enabled cellular HetNet, the cellular system architecture will be moved from tier-2 to tier-3; this involves technologies such as eNBs, SCeNB, and Femtocells, in addition to D2D layers, as shown in Figure 1. In that situation, the total interference between different tiers can be categorized into the following three scenarios:  
1. The first tier and the second tier;
2. The first tier and the third tier;
3. The second tier and the third tier. The high mobility of cellular and spectrum sharing among DUEs between cellular users and DUEs will cause severe interference in the networks and consequently affect the performance of D2D communications seriously. Therefore, for all the issues mentioned for the D2D-enabled cellular HetNets, interference management is the most important. In any wireless communication, the resultant signal of a receiver device is always the combination of the desired signal along with unwanted interference. To cancel this interference, an interference model is created, and the estimated interference is subtracted from the resultant signal to derive the desired signal. However, using proper resource allocation interference can be reduced as well as avoided to a significant degree. In addition to interference mitigation, resource allocation also helps improve the data rate, throughput, and system sum rate of the wireless communication system.