Seems like the invention of the combustion engine which quickly led to cars (and more importantly trucks) is what caused to the fall of steamboats. But I don't understand why we didn't have steam-powered trucks 50 years before that, which would have almost eliminated the need for steamboats...
There actually was a thing that you could call a steam car in the 18th c., the fardier of Frenchman Nicholas-Joseph Cugnot. . He was, however, thinking of it as a solution to a very specific problem: transporting cannon. A 3-pounder field gun would weigh around 700 pounds, and dragging one over very bad roads required a lot of horsepower. A heavy gun would be more than a ton. Cugnot realized that a steam engine might be able to do the dragging, and his fardier of 1770 was an attempt to do just that. It had problems with traction and stability - it could slowly pull 2 1/2 tons, but only when the wheels would grab and if it hit any obstacle it would overturn. But the biggest problem was steam. Steam engines of the time were what was called atmospheric engines, because they would condense steam to create a vacuum, and atmospheric pressure would then drive the steam piston. They worked therefore at low steam pressure ( a good thing, because the boiler etc. could be somewhat weak) but it also meant that they put out little power for their weight: a 1 hp atmospheric engine for pumping out a mine would fill a pretty big shed. Much of that weight was the boiler- especially early ones, that were simply large pots, because that pot had to be filled with boiling water and water is pretty heavy. Cugnot attempted to use a small boiler, to save weight, and because of this the fardier would run out of steam pretty quickly, requiring frequent rest periods to allow another boiler-full of water to be heated to steam again.
This power-to-weight ratio would continue to be the biggest challenge to land vehicles even after more efficient steam engines appeared. When Richard Trevithick tackled the problem in 1801, he would use high-pressure steam and an improved boiler. but his "Puffing Devil" was extremely heavy and difficult to steer. If the steam engine was set on railroad tracks, of course, where steering and weight were not so critical, it could work- therefore the advent of railroads. Later in the century steam traction engines became common for agricultural work like threshing and baling, and they could sometimes be found moving slowly along a road towards the next job... but they were , still, quite heavy and their mobility was still quite limited. It really would take lighter and more efficient gas and diesel engines to be developed before automobiles were practical. There were some attempts to make steam-powered cars, like the Stanley Steamer: but these needed very efficient , light "flash" boilers in order to operate and in the end could not compete with simpler gas and diesel engines.
The other part of your question could be, then , why were there steamboats? This is because a boat is an extremely low-friction device at very low speeds, and can carry very heavy loads without much extra effort. A canal boat hauling 30 tons can easily be pulled by a single mule. After the steam engine was improved by james Watt circa 1770, there were numerous attempts to mount a steam engine on a boat hull and have it self-propelled, and many of them were successful- including Robert Fulton's of 1809.