How to sell your online course before creating it

Last year I made $30,000 selling a product that didn't exist. And then a few months later I made an additional $100,000 in a period of five days selling the actual product once it came out. Today I wanna unpack how to do just that - to sell your online course before you create it and why, more importantly, would you wanna do such a thing?