Navigating Legal Compliance in Autonomous Vehicles