Egyptians stopped building pyramids after the Old Kingdom. We think that is because they were too easy for grave robbers to find. After that, the tombs of the Pharaohs were hidden in the desert.
Pyramids are the tombs of dead Pharaohs.
The "step pyramids" at Saqqara are older than the triangular great pyramids. The Egyptians learned how to build massive pyramids as time went on.