There are a load of options for publishing your online course, and usually I just used course creation tools like Thinkific. Teachable, or Kajabi, but if you want a lot more flexibility in design and structure at a much lower cost point, you can always build it yourself.
If you boil it down, an online course is simple educational content (usually with video) behind a paywall, and there are a million ways to build that setup.
First, if you're putting videos in your course, just pop them on YouTube as "Unlisted" uploads or on Vimeo. Nobody will be able to find them, and you can embed them wherever you want.
Next, find where you're going to host the content. I would consider using a Notion page, as the structure is page-organization focused, and it's incredibly easy to design. You can even use something like Fruition or Super to make your Notion page into a full website!
Now, there are a few ways you can hide content on a website - the easiest way is by using a paid tool like MemberStack. Unfortunately, it's about $25/month for one site plan, and that's a little expensive for my taste. Plus, you can't use Memberstack on Notion websites - it has to be built on a more formal website tool, or built from the ground up.
The second way, which is a little more hacky (but basically free), is using a simply payment redirect with something like Gumroad. When you set up a product in Gumroad, you can embed the product on your site, or simply link to a Gumroad page. Then, when the product is bought, you can redirect to a different page you've built in the same Notion workspace - and that page would contain all the fancy course info.
This, of course, has a problem - you're just linking and anyone could share that link - but I want to dispel this as a serious issue. Yes, anyone could share the link with their friends, and they would all get free access to the course - but I know a few info-product creators that do this and it hasn't resulted in a loss of sales. As it turns out, the people that find a way to "hack" around your paywall in some form or another were likely never going to become customers, and it's going to be one in a thousand people that actually notice they could just share the link of the website.
When people purchase a product, they assume everything functions like it's supposed to. Nobody checks every time they buy something online for whether or not they could share it for free - it's not a common thought. So, it's my belief that you shouldn't worry about it.
But overall, I think this is a superior method as opposed to out-of-the-box course software. You get an immense amount of control over the design of your course, the same content and structure, it's cheaper if you use tools like Notion, and you actually get to keep more of the money. Assuming you use Gumroad, they take 8.5% of your profit - whereas tools like Thinkific and Teachable take 10%.
However, it's going to take more time, of course, to design something from the ground up. I would love to build a template on Notion for this specifically.
Also, I did a live stream on this topic, and you can peek the highlights here if you're interested!