How did the Egyptians get the sarcophagus into the pyramid?

They carried it in or lowered it in. Sometimes, the sarcophagus would even be made inside the pyramid and the body brought to it.