Brokerages will typically set things up so you can automatically sell enough shares to cover your tax liability as soon as they vest.
Typically you have to amend your cost basis on your tax return for this to actually work, for some stupid bureaucratic reason. Probably a conspiracy to make people who get equity compensation buy the more expensive version of TurboTax.
E.g.: you'll get Math.floor(x * (1-bonus_tax_rate)) shares and will owe no income tax (unless your marginal tax rate is over the bonus tax rate). After that point, you'll only owe taxes on possible capital gains from price at the time of vest to the time you sell.
Options, however, can have downside: tax can't be paid with the excerised option itself, because you can't sell the exercised option. So you have to pay the tax out of pocket. Meanwhile, the company can go under, and render the options worthless: you've lost the tax amount. If the company's valuation increases significantly, the taxes can be fairly significant. But you also can't just wait to see if the company succeeds, either: every company I've been at forces you to exercise within a certain amount of time if you leave the company.