The short answer: buy a Maroc Telecom SIM at the airport for 30–50 MAD (roughly $3–5 USD), and you will have workable 4G from Marrakech to Ouarzazate and beyond. It is the one network that actually tries to cover the southern routes, and for anyone doing a Sahara circuit it is the default choice.
Morocco has three main carriers — Maroc Telecom, Orange Maroc, and Inwi — and all sell prepaid tourist SIMs without a contract. Data is genuinely cheap compared to European rates: 1 GB costs around 30 MAD on top-up, and a monthly 5 GB bundle runs about 50–70 MAD. The country has solid 4G coverage in every major city and increasingly in provincial towns. The gaps are predictable: High Atlas passes, deep gorge valleys, and the open dunes of the Sahara.
eSIMs are now a real option too. Several global providers sell Morocco data plans you can activate the moment you land, bypassing any queue at a SIM kiosk. If you are travelling with a private guide through a reputable operator, they can also advise on local connectivity as you go — and will typically have offline maps loaded so navigation does not depend on signal.