I think that was trains, but they used coal to make the steam, so…...
In 1769, the very first self-propelled road vehicle was a military tractor invented by French engineer and mechanic, Nicolas Joseph Cugnot (1725 - 1804). Cugnot used a steam engine to power his vehicle, built under his instructions at the Paris Arsenal by mechanic Brezin. It was used by the French Army to haul artillery at a whopping speed of 2 1/2 mph on only three wheels. The vehicle had to stop every ten to fifteen minutes to build up steam power. The steam engine and boiler were separate from the rest of the vehicle and placed in the front (see engraving above). The following year (1770), Cugnot built a steam-powered tricycle that carried four passengers.
In 1771, Cugnot drove one of his road vehicles into a stone wall, making Cugnot the first person to get into a motor vehicle accident. This was the beginning of bad luck for the inventor. After one of Cugnot’s patrons died and the other was exiled, the money for Cugnot’s road vehicle experiments ended.
Steam engines powered cars by burning fuel that heated water in a boiler, creating steam that expanded and pushed pistons that turned the crankshaft, which then turned the wheels.