Enabling Device-to-Device (D2D) communication in next-generation wireless networks faces significant challenges, particularly path-loss attenuation and interference, which degrade network performance. Existing studies suggest that interference management techniques such as resource allocation, spectrum sharing, and power control can improve network efficiency. However, conventional power control schemes require further enhancements to optimize energy efficiency, throughput, and outage probability. This study proposes a modified Power Control Scheme for D2D communication (mPCS-D2D) that leverages a Hierarchical Cluster Algorithm (HCA) to minimize interference by organizing D2D User Equipments (DUEs) into hierarchical clusters. The scheme is evaluated in both general and millimeter-wave (mmWave) mode communications. Performance assessment through simulations demonstrates that mPCS-D2D achieves an average energy efficiency of 29.722 kbps/J with a 46.03% imporvement, a throughput of 135.994 kbps having a 4.77% improvement, and improving outage probability by 41.06%, surpassing the existing PCS-D2D schemes. These results indicate that mPCS-D2D is a viable solution for power control in D2D communications over uplink channels in 5G mmWave networks. improving network efficiency while maintaining fairness. The findings suggest potential applications in optimizing power allocation for future D2D communication scenarios.