Walkthrough: After defeating the giant Piranha Plant, the barrier around the P-Switch will be broken. This will allow Mario to trigger a trail of flowers to serve as a platform, one that will go from the P-Switch to another platform further up. After running across that next platform, you will find yet another P-Switch. Just to the right will be breakable platforms that lead to a pillar. It is there that you can find Purple Coins, as well as a nut that can be cracked to obtain another Power Moon. Once you obtain them, head back to the platform and activate the P-Switch in order to open another path that leads to the tower. Head down the path and head straight into the tower.
Once inside the tower, activate the next P-Switch to send a flower path up around the tower, dodging any steel beams that try to block you as you travel the path. Once you reach the next area, capture one of the Uproots with the help of Cappy and return to the first moving beam to collect more Purple Coins. From there, climb up to the next P-Switch. As you begin the climb up, continue to use the Uproot. There should be an alcove where the path bends, one that holds a nut with another Power Moon inside. Continue to follow the path after you do, coming to the platform that will bring you to the top of the tower. Grab the Power Moon after you get off the platform with the help of the Uproot, and then leave area as Mario.