How do brokers make and lose money?

Hi, I know that some brokers can make money from commissions, spreads, and other fees but I don’t know how they lose money what Is the business expense of brokerage.

looks like the gambling: you lose - broker win
you win - broker win
in each case they earn money with comissions, best traders get deposits of bad traders

Some of them act as counterparty to your orders, means your loss is their gain and vice versa. Read their ToS to know more about that practices