Whatever your goals are either in creating online courses or in life generally please give yourself an easier time. There are few people who get from A-B without a little bump in the road or in many cases a number of potholes.
The reality is that we often take two steps forward and one back and at times it might feel like two or three steps back. I've certainly had many moments in course creation where I've started something and then scrapped it to start completely again.
However, these steps backwards or hitting bumps in the road are still a move forward because the steps backwards are time to rejig or refocus what you are doing.
I adopt the mentality that everything I do is a calculated bet. Many of those bets don't pay off, but the ones that do allow me to make more bets. As long as I'm proud of the things I've created in the end, that's enough to keep me motivated.
Still, a string of "bad bets" can be disconcerting - and I've had a few lately. But as long as we learn from our mistakes and are proud of our creations and accomplishments, that can keep us going.
It's also helpful to be realistic about what the worst-case scenario is, to keep the impact of failure in perspective. If your Udemy income suddenly dried up overnight (which is highly unlikely,) what would really happen? For most of us, we'd just go back to a "day job" or refocus on the one we have, and adjust our lifestyle accordingly. Not the end of the world. It's OK to take risks.
For any given project, like creating a course, there can be obstacles as well. What motivates me is the knowledge that the effort spent creating that course has absolutely zero value until that course is released. Quitting means losing all the effort you've put into it thusfar, and nobody wants that!