A desirable difficulty is an instructional condition that slows initial learning but improves long-term retention and transfer.
The main desirable difficulties: spacing (distributed practice over time vs. massed), interleaving (mixing topics vs. blocked practice), retrieval practice (testing yourself vs. re-reading), and generation (generating an answer before seeing it vs. receiving it).
Each feels worse in the moment — you're slower, you make more errors. This is why students (and teachers) systematically prefer conditions that feel easy but don't produce learning.