The integration of the Internet of Things (IoT) into high-performance devices and monitoring systems, spanning domains such as smart building, e-health care, and smart agriculture, necessitates a critical emphasis on advancing mobile communications through efficient spectrum utilization. This research addresses pivotal challenges within agricultural IoT applications, specifically focusing on the substantial decline in spectrum efficiency observed with the increasing escalation of network bandwidth. Acknowledging the absence of comprehensive reviews on 5G resource allocation strategies in the existing literature, our study aims to contribute to a nuanced understanding of their implications for service quality. The identified research gaps underscore an urgent need for heightened efforts to optimize resource allocation in 5G networks. This investigation delves into the intricacies of spectrum sharing and real-time analysis techniques within the 5G and beyond network, with a targeted focus on augmenting agricultural IoT services. Three distinct models, namely (i) Non-Priority Algorithm (NPA), (ii) Reserved Channel Algorithm (RCA) - No Permanent Channels, and (iii) Reserved Channel Algorithm (RCA) - Permanent Channels, were meticulously designed and simulated for Agricultural IoT application scenarios. The methodology encompasses the comprehensive evaluation of performance metrics, including call blocking, termination, and handover, to strategically identify and allocate spectrum resources effectively. The research endeavors to address ongoing challenges pertaining to effective communication, standardization, and data management for diverse 5G IoT devices. In light of these persisting concerns, the study not only seeks to enhance the overall efficiency of 5G IoT networks but also proposes innovative perspectives on intelligent and ingenious spectrum allocation techniques. The anticipated outcomes pledge to optimize the utilization of limited spectrum through novel spectrum-sharing strategies, thereby contributing to the advancement of 5G networks and bolstering agricultural IoT devices and services.