If your voltage matches one of the PD levels they work okay but many common voltages like 12v usually end up being very charger dependent. I've got one of the 12v pd triggers that on 9/10 of the PD enabled charges I've used just drops to 9v.
I had thought briefly that something like this should exist, but then dismissed the thought, since such devices would be too much to hope for in the current environment of corporate enshittification. Slight amount of faith in humanity restored.
Yes, the USB Power Delivery 2.0 spec traded the 12 volt level for 9 and 15 volt levels, so not all PD 2.0 capable chargers support 12v output as there are very few devices that actually natively use PD 1.0 12v mode. Almost all devices requesting it are so-called "trigger" devices used to adapt older equipment to run on USB power.
I have a fun-restoring fact for you though: USB PD 3.0 in 2018 added a feature called Programmable Power Supply which allows a device being powered to request any voltage from 3.3 to 21 volts in 20mV increments. As support for this feature is required for a product to carry the "Certified USB Fast Charger" logo it's pretty much standard on any decent charger. I have yet to encounter a single PPS-capable charger that didn't also support the fixed 12v mode.
TBH, wall warts with voltage selector and 10+ detachable types of barrel connectors predate corporate enshittification, which is probably what makes PD variant possible.