Diesels are mostly cheaper to run because european governments artificially reduced the taxing on diesel comparative to gasoline as an help for the economy since most trucks were running diesel for the best low-end torque.
They tend to have a bit better economy but an higher price, so in the end it depends on how long you keep them and the difference is not that positive in countries that tax both fuel the same, like Switzerland.
Diesel engines run at higher compression ratios, 20:1 vs. 10:1 IIRC, resulting in higher thermal efficiency, and they also don't need a throttle valve, meaning there is no pumping loss at partial loads. The higher compression ratio also means they must be stronger (heavier and more expensive).
Modern gasoline engines have a few more tricks though and reduce the gap (like very high top gear, direct injection etc.).
> no throttle valve, meaning there is no pumping loss at partial loads
I believe this effect is small compared to the alternative, which is that partial loads have dramatically excess air. That excess air isn't involved in the combustion, but still gets heated and pumped through the exhaust. That energy loss exceeds the pumping loss through a throttle on a part loaded engine.
Obviously the ideal case for both engine types is that you run it at a lower RPM whenever you need less power out. Unfortunately, that has other downsides (mostly slower response when you floor-it). Luckily, hybrid electric systems mitigate much of that downside by providing rapid response with electricity and allowing your engine to sit at 1000 rpm and 80% throttle in a super high gear while cruising 70mph on the freeway.
It's super common here in Sweden. Hell, we have a diesel car! The used car market was full of diesel cars. All petrol stations here have diesel tanks. It's diesel all the way down!
They need less fuel than petrol, but one issue is that they don't lend themselves well to 100% city driving because this can lead to costly diesel particulate filter repairs as they clog up. Diesel cars automatically regenerate the filters (burn the muck to ash) as you drive e.g. over 40 mph for >25 minutes or so. (depends on car model) You should drive like that at least once a month.
However, where I live, longer distance driving is pretty common.
They're falling out of favor with rising diesel prices since covid and of course EV's. Companies here go full EV nowadays for several reasons, public image only one of them.
I'd also like to go electrical but seems like we're still stuck for yet a few years because they still don't offer charging poles in apartment garages very liberally, and for any kind of convenient EV use, it honestly builds upon the fact that you can charge it overnight close to home.
Why should the type of car matter? It's just an engine, you make it a bit more compact and it will fit in a sedan. Voila, you have a diesel sedan. Sales of diesel sedans have been slowly decreasing in most European countries Inn recent years, but it wasn't that long ago that more than half of all passenger cars (in some countries) were diesel. Of the 4 cars I've owned, 2 were diesel.
Yeah, 11 million diesel vehicles were recalled by VW -- nearly all were ordinary cars (they don't even make a heavy truck). Mercedes, BMW, Audi, VW all sell (or used to sell) diesel cars in the USA. They all certainly do in Europe, where they're joined by all the European brands like Renault and Seat.
Post-scandal, fewer manufacturers are selling them in the US, but there are millions sold every year worldwide in plain old passenger cars.
My car is diesel (in the UK) it was popular a few years ago because CO2 emissions are reduced. Unfortunately particulate emissions are problematic. Hence modern diesel cars need Ad Blu to help catalyse their destruction.
I've mostly owned European diesel passenger cars (in USA). It's lower maintenance, more efficient, I like the way they drive (more torque/cool sound), and a fun hobby with a great community of hobbyists that help each other out.
It's rare enough that I often get very concerned gas station attendees warning me that I'm "accidentally" putting diesel in my car.
Up until the VW scandal GM was pushing diesel in most of their fleet - from the Chevy Cruze, Equinox to the Colorado all had strait 4 diesels as a premium tier option.
16% of personal vehicles in the Netherlands are currently diesel cars. About 20% of all vehicles sold here last year were diesel vehicles. So at least here, it's very common for people to drive a diesel car. They come in all sizes.
Modern Ultra-Low Sulphur Diesel (ULSD) is the standard road diesel in both the EU and USA since many years now. And with modern common-rail engines with electronically controlled direct injection, you no longer get the big black clouds of soot when you push down the pedal either (unless you're one of those "rolling coal" morons that mod their trucks to intentionally produce more of it). And further, modern diesel cars tend to have particulate filters and urea catalysts etc.
So all in all, a modern diesel is pretty clean. Not as good as a modern gasoline car, but still reasonably ok and massively better than old diesels.
Many of the car-buying Americans have the idea of "diesel car" from old Mercedes 240Ds and such, which had the acceleration of a dead snail against a headwind on a good day.
There is nothing inherently requiring diesel cars to be slow.
It never became popular in the US, although there are still a few cars there that run in diesel.
Diesel engines are typically more reliable and cheaper to run than gasoline. More low-end torque also made them easier to drive with a manual gearbox.
They never became common in the US partly because of differing emissions requirements.