I don't know what Elon did but usually pumping is done this way:
A group of influential people buy a coin and later go public with some news or their intent to buy.
People expect something to happen and watch the market, some buy in anticipation and raise the price already.
The group makes its move buying more, but this time in 1 move to make it seen.
They wait for people to go crazy and when it happens they sell what they were buying early on in secret and are able to show that they still hold what they bought at the pump.
Their image stays positive, they make some money, they still hold the asset to be able to show they're true to their word.
Elon did that. He announced that Tesla was going to buy and Tesla did. He later said that Tesla sold some coins but it wasn't him, he still holds
We don't know how much he bought before Tesla's pump, we don't know how much he sold after.