Nowadays, I spend zero time on marketing. I have a whole bunch of well-written articles on my subject. They still rank okay on Google and are evergreen. Marketing these days is word of mouth + SEO.
But for someone starting out: Write articles that teach people something (in a niche). Articles get read for many years. Social media posts go down after minutes.