1. What withholding tax actually is
Withholding tax is a tax collected at source by the country of the paying company, on income leaving that country. It is not a broker fee and it is not optional; the paying agent deducts it before the money moves, which is why the amount that lands in your account is smaller than the dividend the company announced.
Every country sets a statutory domestic rate, and then reduces it for residents of countries with which it has signed a double taxation treaty. So the rate you pay depends on three things: where the company is domiciled, where you are tax resident, and whether your broker has documented that residency correctly.

