The upcoming wireless technology developments in the next generations are expected to substantially transform the vehicle-to-everything (V2X) communication network. The challenge of limited spectrum resources in V2X communication, caused by the need for high data rates, necessitates a thorough analysis of spectrum resource allocation and power control. This complex problem falls under the domain of mixed-integer nonlinear programming; a strategic approach is implemented to overcome these issues, which divides the main challenge into two sub-problems. The issue of resource allocation is addressed by implementing a multiaccess spectrum allocation method, which is deliberately designed to optimize the utilization of the spectrum resources that are currently accessible. Concurrently, the power control issue is resolved by employing a continuous convex approximation technique, which effectively converts non-convex power-allocation issues into convex equivalents. This approach helps to alleviate interference between users. Finally, the simulation results prove that the proposed approaches can improve vehicle performance. The algorithms proposed in this article significantly improve the system throughput and access rate of vehicular user equipment (VUEs) while ensuring the data rate of cellular user equipment (CUEs).