The best thing a DM can do (thinking specifically of D&D here), is to do his best to push the party to absolute, utter defeat*, and then watch them try to wiggle their way out, with the party's victory determined solely by their choices and abilities.
(Of course, given how good I am at judging response rates, this is the post that no one will comment on.)
*With defeat defined by the campaign and the group's play style. It could be death at the hands of a growling demon in the lowest level of a dungeon, or the evil archduke's successful ascension to the empire's throne.
NewbieDM Review: Tales from the Yawning Portal
5 hours ago