Diagnosis
This is almost never the motor or wiring (which would be a serious fire hazard). It's almost always foreign material—a dust bunny, a hair, or a small piece of lint—that has settled on the heating element and is burning off.
How to Fix It
Unplug the dryer and let it cool completely. Perform a deep clean. Remove the rear filter and clean it. Then, with the filter off, point the nozzle of a can of compressed air (used for keyboards) at an angle into the filter intake. Give it a few short bursts to dislodge any debris that may be on or near the heating element inside the handle. Reassemble and run it on a cool setting in a well-ventilated area for a minute to clear any remnants.
If That Didn't Work
If the burning smell persists strongly on the *cool* setting (where the heating element is off), then there could be an electrical fault. Stop using it immediately and contact Dyson support.
Heads Up
That initial 'new appliance' smell during the first few uses is normal. A persistent burning smell is not. Also, avoid storing the dryer in a dusty drawer or cabinet without its filter attached.