In general, yes, you can absolutely put strong enough line on that will let you haul a fish straight out of the water dangling from it. It you fish for small fish (perch, bluegill, etc.), that's basically what you do every time. They are small enough that even the lightest line will still hold them.
The challenge, though, is that the stronger the line is, the more visible it is to the fish, and the less finesse you have when fishing with it. More visible line can spook fish and get you fewer bites. And a thicker, stiffer line can make it harder for you to work the lure in a realistic way that entices fish to bite.
So you're always making the trade-off where lighter line means more bites but a greater risk of not landing the fish if it breaks the line. Stronger lines mean fewer bites but if you get a hookset, you can probably land the fish.
There are other complications too: fish aren't the only thing in the water. Stronger line can help you not lose lures if it gets tangled on branches or other obstructions.
On the other hand, lighter line is more fun to fish with. You feel what the fish is doing much more clearly and the fight is more interactive. Catching a small fish using a big stiff fishing rod with heavy line feels like listening to music with earplugs in. You lose a lot of the experience.
Also, there are different kinds of line: monofilament, fluorocarbon, braid. And you don't have to use the same kind of line for the whole length. Sometimes it makes sense to have a leader (a short section of line at the end) that's lighter or heavier than your main line.
One of the delights of fishing is that it's an endless problem-solving exercise in gear optimization.