Merzouga has the big Sahara dunes and needs 3 days from Marrakech; Zagora is a closer 2-day option with smaller dunes; Agafay is a rocky day trip near Marrakech, not real desert...
A day-by-day 6-day Morocco itinerary from Marrakech across the High Atlas to the Sahara at Merzouga and on to Fes — what you see each day, driving times, and how to choose one-way vs round-trip...