The general shape is that generating and delivering contact information is advertising, and negotiating, showing, soliciting listings, or being paid based on whether a transaction closes is the part that licensing statutes tend to reach. Where that line actually sits is set state by state, and a few states draw it tighter than most, so the only reliable answer for your situation comes from a real estate attorney or the licensing commission in your state.
Two details are usually what tips a marketing arrangement into trouble. The first is compensation tied to closings. A flat retainer or a fee per lead is a marketing fee. A payment that only happens if the seller signs, or a share of the commission, starts to look like compensation for procuring a transaction, and that's the language most licensing statutes use. The second is who talks to the seller. If the agency's call center is answering, asking about price and condition, and telling the homeowner what your client will pay, they've moved past delivering contact information.
Separately from licensing, the ads themselves carry rules. Fair housing language applies to advertising, and platform targeting for housing ads is restricted, which is why housing advertisers on Meta have a limited set of audience options. Some states also require that advertising which names a brokerage include the brokerage name and license number. Ask the agency to show you sample ad copy and a sample landing page before you sign, and have your broker look at them.