You will be heading inside the pyramid, via the entrance at its base, in order to obtain this star. At this point, you should be familiar enough to know how to get to the pyramid’s entrance, so this guide won’t be holding your hand there. It’s pretty easy to use the Koopa shell atop the stone structure to get there much more quickly, though. Once inside the pyramid, you have two ways to go at the entrance, either left or right. Left will take you to a dead end, so the right path is the way to go. After passing some Goombas, you will encounter what looks like a Thwomp, but it’s called a Grindel.
This thing will just move up and down on its own, so wait until you can pass underneath it safely. Continue along the path, jumping over the sand because it is hard to get out of and you’ll have to use the platforms in the sand to get out of it. At the ramp, take the right path and skirt past the Amp by the one pillar. You will come across that same Grindel as before, but you will need to jump past it this time. Climb the pole to get to the next floor, where you find a grating you can cling to, allowing you to cross over a steep ramp that would knock you into a sandy “river.”
Jump to the next floor, where there will be a variant of the Grindel, the Spindel. It’s nothing more than a giant rolling blockade and should you want to get past it unscathed, then you can either jump over it or use the notch in the wall to hide while it rolls past. On the next floor, you will have to deal with a few Amps appearing out of nowhere, who will home in on Mario’s position. As long as you keep moving, they shouldn’t either bother you in the slightest. Climb the pole to the next floor, which will be the last one before you can reach the star.
Here, you will have another Grindel blocking your way, with this one hopping back and forth along a small path. You can either sneak underneath it while it is jumping or hop on top of it, but be wary of the camera being a little funky up here. Once you manage to get by it, run up the ramp, then jump to the ledge at the very top to grab the star.