I learned how to cook before youtube.Trial and error. If you fuck up, then you can eat your mangled concoction and learn from your mistakes. Having an eye for detail helps as well.
this... and take good notes as you cook. Invest in timers, thermometers and measureing devices and a scale. Take notes on all these things. I didn't learn to cook that way and regret it now.start with your favorite dine out meals and google the recipes.
trial and error those until you make something you're happy with. it'll give you an idea of how much spice, salt, butter, or oil you like. which is great to know when expanding to more kinds of food.