I understand that bicycles came before cars which is why I’m asking
Cars came before motorcycles, largely because they can accommodate larger engines - smaller engines needed to be developed for successful use in motorcycles.
Powered cars predate the earliest bicycles. The first pedal-driven bicycles appeared in about 1867, long after the first pedal-driven tricycles (in 1789). The first powered cars were steam-driven. What counts as the "first car" depends on what one is willing to accept as a "car". The first (semi-)successful engine-powered road vehicle appears to have been Nicolas-Joseph Cugnot's tricycle steam-car of 1769:
Cugnot attempted to develop vehicles for wider use, building two similar vehicles intended for use by the French army as artillery tractors (they weren't adopted by the army). 1786 saw a working steam-powered passenger carriage built by William Symington:
Symington also worked on steam-powered boats. Other steam carriages followed, which more or less worked, but tended to be heavy and slow. A more successful steam road vehicle was Richard Trevithick's "London Steam Carriage" of 1803:
Trevithick is better known for his steam railway locomotives, the ancestor of the steam locomotives which ruled the rails for a century (and still work on them today). Trevithick's greater success over his predecessors was due to his development of high-pressure steam engines, which allowed a smaller engine to produce more power. This improved power-to-weight ratio made his engine more suitable for smaller vehicles.
The first successful internal combustion engines were developed in 1807, by two independent inventors. Nicéphore Niépce built "Pyréolophore", fueled by a mix of moss spores, coal dust, and resin, and used it to power a boat. Isaac de Rivaz, who had previously built steam carriages, built a hydrogen engine, and used it to power a car:
While his car ran, it had no chance of wide adoption until a better engine could be made - the valves controlling the flow of air and hydrogen were manually operated. Steam and horses continued to power road vehicles:
Better internal combustion engines were developed, and better internal-combustion-engined cars followed. Étienne Lenoir's "Hippomobile" of 1863 already has the form of later cars, rather than looking like a horse-drawn carriage with a steam engine:
This probably predates the pedal-driven bicycle ("probably" because the early history of the pedal-driven bicycle is poorly-known).
Karl Benz's two-stroke petrol engine of 1879 (just - he finished it on New Year's Eve; it was patented in mid-1880) was a big improvement over what had come before, and was followed by a successful four-stroke engine. These engines became the foundation of commercially-successful mass-produced road powered road vehicles. The first road vehicle to use Benz's engines was his "Benz Patent Motorwagen" of 1885. This was essentially a car-bicycle hybrid. It was a tricycle making much use of bicycle engineering, such as lightweight wire-spoke wheels:
Depending on definitions, one could call this either a car or a motorcycle (or both). It went into commercial production. Benz's four-wheeler, his 1894 "Velo" or "Velocipede" (using the older name for bicycles) sold over 1000. Benz's Motorwagen was preceded by another petrol-powered tricycle, Edward Butler's "Butler Petrol Cycle" of 1884 or 1885:
(the single wheel is the rear wheel). Butler's car/motorcycle didn't succeed commercially (perhaps it would have if he'd been supported by investors).
There had been earlier experiments with steam-powered motocycles:
Sylvester H. Roper's "Roper steam velocipede" of 1867 or 1868: https://commons.wikimedia.org/wiki/File:Roper_steam_velocipede_1868_The_Standard_Reference_Work.png
Louis-Guillaume Perreaux's "Michaux-Perreaux steam velocipede" of 1867-1871: https://commons.wikimedia.org/wiki/File:Michaux-Perreaux_steam_velocip%C3%A8de.jpg
These were one-off experimental machines, and did not go into series production. The first internal combustion engine powered two-wheeler (if you don't count its "training wheel" outriggers) was the "Daimler Reitwagen" developed by Gottlieb Daimler and Wilhelm Maybach in 1885:
It was also a singular experimental vehicle. Meanwhile, as tricycle cars and four-wheelers were in commercial productions, motorcycle experiments went on. Commercial success finally came in 1894 when Heinrich and Wilhelm Hildebrand and Alois Wolfmüller developed their "Motorrad":
It inherited much of its design from an earlier steam motorcycle built by the Hidebrand brothers in 1889. The Hildebrand & Wolfmüller Motorrad was the first mass-produced motorcycle, with about 2000 being produced.
Electric vehicles had also been in development. The first electric cars/carriages were built in the 1830s by at least three different inventors (Robert Anderson, Professor Stratingh and Christopher Becker, Thomas Davenport). Better vehicles followed as better batteries became available, but real success would require better batteries, which didn't appear before the internal combustion engine became a serious contender. The first electric bicycle patent applications appear to be from 1895, by two independent American inventors: Ogden Bolton Jr. and Hosea W. Libbey. The petrol motorcycle, courtesy of the Hildebrands and Wolfmüller.