Network communication has grown rapidly with massive demands of services. Moreover, resource allocation in networking is a fundamental and crucial issue that cannot ensure the network's stability and efficiency with the myriad requirements of different services. Various vertical businesses may seek varied network services, particularly in the Fifth-Generation networks and Beyond (5G+). The pros of Fifth-Generation communication networks are to outperform 4G in performance by having higher bandwidth, minimum latency, more capacity, and QoS (Quality of Service). Software-Defined Network (SDN) and Network Function Virtualization (NFV) are two technologies that are combined in the next generation cellular network to provide improved network management. The primary idea behind resource allocation (RA) in the next generation network is the concept of network slicing where the network resources are virtually partitioning into many separate networks. Each separated network must satisfy the unique needs of the required service to achieve the required QoS. In this survey, we focus on resource management issues related to network slicing and tackling the biggest obstacles in this field while offering a thorough and up-to-date overview of this field. Thus, thorough analysis of the allocation of resources on the access side and core side of the network communication was sought. Also, demonstrates how revolutionary techniques that are used to support the management of sliced networks which are based on Machine Learning (ML) and Artificial Intelligence (AI). Importantly, use appropriate ML techniques such as deep learning for predicting the network condition and Reinforcement learning to learn optimal allocation policy without depending on prior knowledge and other techniques such as classification and clustering to aggregate the similar needs of users into separate slices. This could help to enhance resource utilization by allocating a sufficient amount of resource as needed based on ML algorithms and optimal utilization of resources and reducing operational costs by real-time adjustment of it based on user demands and network conditions