Yeah, until PHEVs, only hybrids were Toyotas and until 4th gen, it was similar co2 to diesels for small cars but still smaller co2 for large cars. So you would buy a diesel because you get 5-10% tax discount as well.
Now that changed in past 5-6 years due to emissions laws and Euro7 coming into effect which made diesels more expensive, and started the disappearance.
Diesel fuel is still considered subsidized in many countries, and there is even blue diesel which is used for farm and boat equipment and has 2x smaller taxes.
Compared to petrol vehicles, diesels are much more frugal and a lot faster. So you paid more for a turbo diesel because it would use 8l/100km instead of 12l/100km plus it would be faster than comparable petrol.
But throughout the years, emissions would get much worse due to clogged equipment and yeah you would get terrible air inside cities.
All of the benefits meant people bought diesels exclusively for anything larger than a Corolla. Germany had something like 56% diesel take rate for a very long time... now it is under 10%.
In the US there are different issues with diesels that made me regret ever buying them. Any type of service, even the basic annual inspection, was always a headache. Most repair shops don't do diesel inspections, so it was either a specialty shop with long waits, or the dealer - so a quick 30 minute stop turns into a full day ordeal, at best. Any repairs, especially anything having to do with the unreliable emissions crap, pretty much meant a trip to the dealer, which meant scheduling an appointment far in advance and having them keep the vehicle for extended periods of time, and dealing with downtime.
Even filling up was somewhat annoying. There are relatively few gas stations here that carry diesel, and those that do are always filthy - since diesel fuel is essentially oil, it doesn't evaporate like petrol, so the pump handle and the floor around the pump are always covered with diesel. Pretty irritating even in a work truck, completely unacceptable for people driving passenger cars.
It is similar with EVs from mainstream brands, I hear horror stories of dealer repair shops not having certified technicians to work on EVs, and extensive lead times on parts from the manufacturer. Like I was saying earlier, mainstream manufacturers view EVs as annoying compliance headache they have to deal with, but they got a bunch of money from the government, so they slapped together a few very half assed EVs that nobody wants. At the same time, they are far more content selling $100k pickups that nobody can afford, and have completely abandoned reasonable, affordable models that people want. As much as I don't like the Chinese automakers, I can't wait for them to flood the US market, and put pressure on the established brands.
Meanwhile, everyone loves to hate on Tesla, but they are the only ones constantly expanding and improving, offering reasonable service, and not participating in the ridiculous price gouging. I don't care for EVs in general, but I absolutely respect Tesla for what they have accomplished.