Due to the vast rise of users, the variety of application requirements, and the enormous necessity for ubiquitous connectivity anytime and anywhere, integration of new technologies and ideas are required. Therefore, Device to Device (D2D) communication technology has been regarded as a critical concern for Beyond Fifth Generation (B5G) networks. In the D2D technology, devices in close proximity may connect without using a Base Station (BS). Consequently, improving the capacity and performance of traditional networks. The major objectives are to accomplish a high geared data rate, increase the network coverage with low latency, and improve Energy Efficiency (EE) and Spectrum Efficiency (SE). However, the coexistence of D2D technology in the traditional network can pose many issues and challenges, such as power control, interference, spectrum access, security, and mode selection. Consequently, a comprehensive survey that includes an investigation of the current issues in D2D technology is required. In this survey, we present a new categorization of the most important aspects of resource management in B5G D2D communication, such as power allocation, spectrum allocation, interference management, and mode selection. Furthermore, we discuss the limitations and open issues of the current techniques and propose a model approach and future directions for D2D communication in B5G wireless networks. Our survey aims to assist researchers in exploring and improving D2D communication within the framework of forthcoming wireless networks.