The $500 ads are the pre-license course, yes. Here's roughly what stacks on top, with the caveat that licensing is state by state and the numbers move a lot between states.
Pre-license course, often $300 to $800 depending on state hours required. State exam fee, usually under $100 and sometimes repeated. Background check and fingerprinting, typically $40 to $100. Initial license fee, commonly $100 to $300.
Then the recurring layer, which is the part people underestimate. Local board and state association dues plus national dues if you join, often $600 to $1,200 a year combined. MLS access, frequently billed quarterly, commonly $40 to $150 a quarter. Lockbox or electronic key service, often $20 to $30 a month. Continuing education every renewal cycle. E&O insurance, which stands for errors and omissions and covers professional mistakes, is usually carried by the brokerage and charged back to you either monthly or per transaction.
Brokerage cost varies most. A traditional split brokerage takes a percentage of each commission and often covers the tech and some marketing. A flat-fee or 100% shop charges a monthly desk fee plus a per-deal fee and covers less.
Per listing you're also paying photography, commonly $150 to $400, and more with drone or video. Signage, lockbox, and any paid promotion sit on you at most brokerages.
A realistic first year before any closing is a few thousand dollars, and it's front-loaded. The thing that actually breaks new agents is that a listing takes real money out the door months before a commission comes in, and the first check might be six months after the first expense.