there's multiple ways to go about this. the simplest would be to implement the functionality within the level itself, writing a value to
SaveData when the level is first visited, and simply hiding the powerups if the level's been visited before.
if you want to implement the functionality on the world map, you'd once again have to write to
SaveData when the level gets visited, but then on the world map you'd do something like change the level's filename to a blank string on startup if it's been visited before (making it inaccessible). currently (according to the documentation, at least) there's no way to change a level's icon on the world map, so you'd have to get creative with that. one way would be to make it so the level's default icon is what's displayed when it's already been visited, meaning you'd just draw a toad house image over it before that's happened.
for reference,
here's the documentation for overworld levels.