The other answers have touched upon the relative efficiencies between a phone charger and a desktop computer's PSU. But I want to also mention that the comparison may be apples-to-oranges if we're considering modern smartphones that are capable of USB Power Delivery (USB PD).
Without any version of USB PD -- or its competitors like Quick Charge -- the original USB specification only guaranteed 5 V and up to 500 mA. That's 2.5 W, which was enough for USB keyboards and mice, but is pretty awful to charge a phone with. But even an early 2000s motherboard would provide this amount, required by the spec.
The USB Battery Charging (USB BC) spec brought the limit up to 1500 mA, but that's still only 7.5 W. And even in 2024, there are still (exceedingly) cheap battery banks that don't even support USB BC rates. Motherboards are also a mixed bag, unless they specifically say what they support.
So if you're comparing, for example, the included phone charger with a Samsung S20 (last smartphone era that shipped a charger with the phone) is capable of 25 W charging, and so is the phone. Unless you bought the S20 Ultra, which has the same charger but the phone can support 45 W charging.
Charging the S20 Ultra on a 2004-era computer will definitely be slower than the stock charger. But charging with a 2024-era phone charger would be faster than the included charger. And then your latest-gen laptop might support 60 W charging, but because the phone maxes out at 45 W, it makes no difference.
You might think that faster and faster charging should always be less and less efficient, but it's more complex since all charging beyond ~15 Watts will use higher voltages on the USB cable. This is allowable because even the thinnest wire insulation in a USB cable can still tolerate 9 volts or even 20 volts just fine. Higher voltage reduces current, which reduces resistive losses.
The gist is: charging is a patchwork of compatibility, so blanket statements on efficiency are few and far between.