I suggest the wiki for getting started on soil science, if you are interested, https://en.wikipedia.org/wiki/Soil
More on what sand is, http://www.sandatlas.org/sand/
More on wind driven sorting, https://people.ucsc.edu/~jzachos/migrated/eart120/lectures_08/LECT7B.pdf
The north african shield has zones hundreds of millions of years old, I cant find pages on the geology of N Africa, it is volcanically active: https://www.volcanodiscovery.com/north-africa.html The massive Atakor volcanic field is the largest in the Hoggar (or Ahaggar) volcanic province of southern Algeria and covers an area of 2150 sq km
Paleoclimate proxy data and computer simulations reveal that the Nebraska Sandhills likely had active sand dunes as recently as the Medieval Warm Period, when temperatures in the North Atlantic region[4][5] were about 1°C (1.8°F) warmer than the current climate. Wikipedia
A thin layer of topsoil is formed.
Aerial photographs of the Spirit Dunes, Manitoba, Canada show this can happen in decades:
The Sahara dunes were still there during fertile times - they were just grown over with grass. When conditions became arid, what little topsoil there was blew away and/or was mixed with the sand.