Vehicular Ad Hoc Networks (VANETs) are wireless networks formed by vehicles on the move, requiring efficient routing for reliable and timely communication. This paper presents an enhanced routing algorithm for VANETs that optimizes route selection while considering distance, residual energy, and congestion awareness. The algorithm aims to improve network performance by dynamically adjusting routing decisions based on congestion levels in the network. A congestion detection mechanism is designed to identify congested areas and mitigate congestion by rerouting vehicles. Extensive performance evaluations and simulations are conducted to compare the proposed algorithm with existing routing algorithms, measuring metrics such as packet delivery ratio, end-to-end delay, throughput, and energy consumption. The scalability of the algorithm is analyzed under varying network sizes and densities. Additionally, energy efficiency is optimized by considering the residual energy of vehicles, ensuring efficient utilization of high-energy vehicles and minimizing energy wastage. Practical aspects and challenges of implementing the enhanced routing algorithm in real-world VANET environments are discussed, providing insights for future deployments. The comparison with existing algorithms highlights the advantages, limitations, and performance trade-offs of the proposed approach in terms of congestion awareness, energy efficiency, and overall network performance. The results demonstrate the potential of the enhanced routing algorithm to improve communication reliability and efficiency in VANETs.