Position sizing answers one question: how much should you risk on a single trade? It sounds simple. It's the single most common thing new traders get wrong, often before they've even picked a bad strategy.
Here's the problem in plain terms: it doesn't matter how good your strategy is if one bad trade can wipe out a huge chunk of your account. Position sizing is what stops that from happening.
The 1-2% idea
A common starting rule: don't risk more than 1-2% of your total trading account on a single trade. If you have a $10,000 account, that's $100-$200 at risk on any one position: not the full size of the trade, the amount you could actually lose if it goes wrong.
Why beginners get this backwards
Most new traders size their positions based on how confident they feel, not on a fixed rule. A trade that "feels certain" gets a bigger size. The problem: feeling certain and being right are two different things, and the market doesn't know how confident you were.
The traders who last years, not months, size every trade roughly the same way, based on the rule, not the feeling. The strategy can be good or average. The rule is what keeps you in the game long enough for a good strategy to actually pay off.
It's not just about one trade
Position sizing also protects you from a string of losses, which happens to everyone eventually, even with a good strategy. If you risk 2% per trade, five losses in a row costs you roughly 10% of your account. Painful, but recoverable. If you'd risked 10% per trade instead, five losses in a row would take out roughly half your account, much harder to come back from.