Advertising is a subset of marketing.
If you hear or read someone talking about spending money to transmit a message at scale but they use the word marketing to describe that activity, they are conflating advertising and marketing.
For them, this conflation may not be problematic, but if you're not careful to note the context they're coming from (commodity or non-commodity), then their conflation can lead confusing places.
Places like this Twitter thread: https://twitter.com/craigmillr/status/1491100580919803905. The conversants there are using advertising and marketing nearly-interchangeably. I try not to be pedantic about stuff that doesn't matter, but this does matter because if you're curious about brand marketing in the non-commodity context, you might notice a thread like the aforelinked and wonder how it applies to you. Because of the contextual differences, it mostly doesn't apply.
In the commodity world, brand marketing usually involves advertising. In the non-commodity world (our world), it can involve highly targeted, personal gifts that involve spending no money at all on advertising.
Apples and oranges, for the most part.