Every encounter (with a particular emphasis on numbered rooms in a dungeon, but not exclusive: a shopping trip or meetup at the inn could be an encounter, negotiating with the Duke could be an encounter, etc.) is worth 0-4 XP, at DM discretion. Doesn't matter what happens: combat, social engagement, trap, puzzle poking a wall with ten foot poles for fifteen minutes, etc. It's worth 0-4 XP: The average is assumed to be 2, and the book recommends basing the judgement on the difficulty of what was accomplished. The amount is determined by DM adjudication, of whatever standard seems to apply. They get through the trap in a businesslike manner, 1 XP. If the party does something off the wall and so amazing people are snorting Mountain Dew and high giving each other, maybe 4 XP. The XP doesn't come from particular activity, but from playing the game, and incentives engagement with what will make for cool moments rather than maximizing combat kills or loot.
The big question for 5E adaption would be the math: max level in DCC is 10, which is 1090 XP.