Speaking of earthworks, when a wabble of wowdy webels holed up in Masada, the Roman commander built a small wall around the whole fortress to ensure nobody went in or out, then laid seige while building a ramp up to the wall atop the rock. Supposedly he used captured Jewish risoners to build the wall, so anyone trying to kill the workers from above was only killing prisoners. Then they advanced a seige engine up the ramp to breach the walls.
The remains of the wall and the ramp are still visible.
In fact thinking about this I’d definitely say they were never "a mystery"in the way stonehenge was.
True probably a medieval arab speaking Egyptian peasant probably couldn’t give a good explanation of who built the pyramids and when. But the same is true for their counterpart in medieval Italy about the coliseum.
The academic elite both those places (which was a thing even in the “dark ages”) could give you a fairly good answer. It was never “lost knowledge”
The part most people would easily recognize, the outer ring of linteled sarsen stones and the trilithions, date to circa 2600-2400 BCE. That’s the same time or later than as the Great Pyramid. Other recognizable parts, like the inner bluestones, are probably contemporaneous with the Pyramid in origin if not earlier, but were placed in their current configuration only hundreds of years later. The dirt embankment is the earliest phase, which is significantly older than Giza.