From 2014 until 2024, Apple undertook a research and development effort to develop an electric and self-driving car, codenamed "Project Titan". From Wikipedia
Apple collaborated with BYD on advanced battery technology for its now-canceled car project, investing billions over several years.