Imhotep designed the first one - the step pyramid - which seems to have been his own invention, stacking successively smaller mastabas on top of each other. (Also, I believe, the answer to the trivia - Imhotep the first verifiable person named in history who was not a ruler)
Two possibly incomplete step pyramids, then one that was allegedly smooth sided but the outer part collapsed.
By the fourth one they appear to have settled on the smooth side concept, although it too was a learning experience. It’s the “bent pyramid” because they figured out halfway up when it started to shift that the sides were too steep. (This is why all pyramids look roughly the same - build them too steep, the sides eventually collapse. The 3 giant pramids of Giza are built on a limestone base, but still need to be at an angle to be solid. Plus, it simplified the building process - less likely to have the whole thing give way as they added more blocks.)
After that, it was pyramids all the way, but the old kingdom became too poor and disorganized to build the massive pyramids it first had - they began using bricks and rubble instead of large cut stone, or building a shell and filling the interior with rubble -which of course collapsed.
During the following chaotic centuries the tombs were looted, so they switched from giant pyramidal tombs to deep tunnels in the rock of Valley of the Kings. Those still got looted.
But Egyptian pyramids, unlike the Mayan or Aztec ones, were never built for hosting ceremonies on top. In fact, none really had a flat top set up for ceremonies. By the fourth one, they were big pointy-topped smooth-sided piles.
Whereas the Mayan pyramids, as I understand, had their own evolutionary history. According to the book 1491 they started as a 3-sided U-shaped platform surrounding a plaza, where religious ceremonies could be held in view of the masses. then the “bottom” of the U shape became taller and turned into the pyramid shape.