You wrote something you are doing content writing.
But when you create content for yourself &, you create content for specific target audiences. Your audiences can judge whether the content you wrote deserves a positive reaction. In that case, content marketing comes into the picture.
Content Writing: You write stuff. Done.
Content Marketing: You take the great stuff you wrote and enhance its visibility so that more and more audiences can discover it.
For a brief, read this.