The seller's listing agreement sets aside a portion of the commission for whichever brokerage brings the buyer, and that split is negotiated before the home ever hits the market. A buyer only pays their own agent directly in the rarer case where a seller refuses to offer buyer-agent compensation and the buyer agrees to cover it themselves.
This is different from hiring a lawyer, whose legal fees typically run $800 to $1,500, or a home inspector, who is paid $400 to $600 directly for the service. Representation in a purchase is built into how the sale is structured, which is why a buyer can afford professional representation on every offer without a separate bill.
Ask before you write an offer, not after. Get your hand-reviewed valuation from Joel Dyck.