Yeah, building on what Nick said: I think it was possible at one time, 7-8 years ago, to launch a course on Udemy with no audience, and let them handle the marketing for you.
I heard a podcast recently and a successful Udemy instructor had said that these days, the SEO required to succeed on Udemy is even harder than the SEO to rank in Google. When you search for a topic on Udemy (eg. React, Go), there are dozens of highly-reviewed courses, and it's impossible to show up in those results unless you already have a huge audience or want to spend lots of money on paid traffic.
So yeah, I think it's true that you need an audience to succeed with a self-published course, but honestly I think that's true no matter which route you take.