In the first castle you come across in Super Mario World, you have to deal with this fence that you can climb on. Trouble is, that it's swarming with Koopas.
But, you can totally use it to your advantage.
You have two main ways to dispatch Koopas on the fence: you can punch them if they're on the opposite side, or you can descend on them from above and stomp on them... sort-of
Now, like other Mario games, if you continue to stomp on them without hitting the ground, your point values for each successive stomp increase.
And, since we're climbing around on a fence, we're staying well above the ground. And that means that you can take your time methodically stomping on Koopas to eventually get
a 1UP! There are enough Koopas crawling around on the fence that you can get several 1UPs before you have to get back on the ground.
And, if you're hard up for extra lives at that point, just swan dive into the lava, restart the stage, and do it again. As long as you're gaining more lives than you're losing, you'll come out ahead.