Instructions
Ride Ruin to stay out of the Sandworm's way. Wait until it comes up to attack it.
Keep an eye on the creature's mouth and as soon as you see its mouth begin to open, dash forward to attack.
Fire at the Sandworm's open mouth using your pistol, "Mercy." You need to aim at its tongue to be effective. Continue firing until the Sandworm falls to the ground. This could take several minutes.
Gallop over to the fallen Sandworm and then send an attack by pressing the "B" button. This will kill the creature for good.