The detection of vehicles is a crucial task in various applications. In recent years, the quantity of vehicles on the road has been rapidly increasing, resulting in the challenge of efficient traffic management. To address this, the study introduces a model of enhancing the accuracy of vehicle detection using a proposed improved version of the popular You Only Look Once (YOLO) model, known as YOLOv5. The accuracy of vehicle detection using both the original versions of YOLOv5 and our proposed YOLOv5 algorithm has been evaluated. The evaluation is based on key accuracy metrics such as precision, recall, and mean Average Precision (mAP) at an Intersection over Union (IoU). The study's experimental results show that the original YOLOv5 model achieved a mean Average Precision (mAP) of 61.4% and the proposed model achieved an mAP of 67.4%, outperforming the original by 6%. The performance of the proposed model was improved based on the architectural modifications, which involved adding an extra layer to the backbone. The results reveal the potential of our proposed YOLOv5 for real-world applications such as autonomous driving and traffic monitoring and may involve further fine-tuning, robotics and security system and exploring broader object detection domains.