Hey! Honestly for me it's the result of trial and error over many years. I probably could've learned faster if I actually followed more tutorials, but I'm stubborn.
If you'd like to learn I suggest trying different shaders on godotshaders and then building off them for your own works.