As the name of this star suggests, you will be using a cannon, which means you will have to open it up first. If you’ve done the majority of the stars thus far, then you should know where the Bob-Omb Buddy is located. From the beginning of the stage, the cannon will be straight in front of your starting position, inside of a rock, but if you never talked to the Buddy, then it will still be closed. Look for the platform with the spire next to it not too far from the start. Head on over there and climb onto the platform, where you should find the Bob-Omb Buddy.
So, speak with it and you will finally open up the cannon. Return to the cannon and enter it, although you might not know where you will be blasting yourself. Look for the set of three larger spires off to the left from where you begin the stage. There will be a small ledge you can spot next to these spires, and that is where the star is located. So, you will need to launch yourself to the closest spire, but you have to aim high enough so you grab the skinnier portion. Once you get to the spire, position yourself accordingly and jump down to the ledge to grab the star.
Note: There are other methods to obtaining this star, but they tend to require a lot of practice or harder movement than necessary, so they won’t be listed here.