Salaries and bonuses are operating expenses so you can pay them and it will decrease the company’s taxable income. The flip side of that the recipient of the bonus must pay personal income tax on the bonus. Company tax is 20% and personal income tax is a sliding scale peaking at 35%.
You can do the math but at some level it works out better to pay yourself a dividend rather than a salary as dividends are taxed at 10%. Dividends are a below the line item and paid from after tax profits so using a dividend will save you 5% in PIT but only if you have reached the 35% level already.