It's all based on pushing volume and making money on the "skim". This is the difference between the buy (bid) price and the sell (ask) price of an asset. When you buy, you pay a slightly higher price, and when you sell, you get a slightly lower price. The broker pockets the difference.
Additionally, some brokers get paid by third parties (like large financial firms or market makers) to route your buy and sell orders through them. This is called payment for order flow. The third party benefits by handling lots of transactions, and the broker gets a small fee for each order they send.
They also make money on cash balances. If you have uninvested cash in your brokerage account, the broker can use this money to earn interest. They might lend it out or invest it themselves, and they keep the majority of the interest earned. Some brokers offer you a tiny amount of interest on your cash balance, but it's usually much lower than what they earn.
And they can also make money on commissions. While most trades are commission free today, there are still investments that do have a fee.
Also, they can make money on margin interest. If you borrow money from the brokerage to invest (called trading on margin), you pay interest on that loan. This interest can be quite high and is a significant source of income for the brokerage.