You have probably bought more courses than you have finished, and you tell yourself the problem is discipline. It is not, it is the way you set the goal.
The finish line is too far away, so motivation dies before you get there. The fix is to shrink the goal until it is too small to fail: one lesson a day, or twenty minutes, no exceptions.
Track your streak instead of your progress. A calendar with a mark for every day you studied becomes a chain you do not want to break, and momentum does the rest.
Then remove friction. Keep the course open in a tab, schedule the time, and silence your phone before you start. You do not need more willpower, you need a smaller goal and fewer obstacles in the way.