Vehicular Adhoc Networks (VANETs) are a new and exciting area of study. VANETs consist of many different entities that must coordinate with one another and with other services in order to function properly. Routing problems and security breaches are only two of the common problems that plague VANETs. Existing literature has a number of solutions to these problems, but most of them don't address routing and security problems at the same time. This paper identifies the restrictions imposed by routing behavior, such as control overhead, convergence, and erroneous location, and uses those constraints to determine the best paths for ensuring that no vehicles or packets collide with one another. Intrusions on the security of routed packets or vehicle nodes necessitate a selected security mechanism to ensure the privacy of sent information. To reduce this additional control load, this paper creates a routing system based on Deep Reinforcement Learning (DRL). The DRL speeds up convergence on dynamic vehicle density by optimizing the routing path. The DRL keeps a close eye on the transmission capacity and vehicles to analyze and anticipate routing behavior. As a result, V2I communication shortens the time it takes to transmit data by having the vehicles in close proximity to transport the packets.