Do you want to write code?
Or do you really just want to solve a specific problem that can be solved with code?
If your ultimate goal is solving a specific problem, you maybe be able to put together a solution by adapting examples from the internet, even if you don't actually understand why the code works. There is absolutely nothing wrong with this. In fact, this method can enable you to improve your workflows so that you can spend more time on your true calling, whatever it is.
If adapting examples from the internet is too difficult, and you just want a working solution, consider hiring someone to write the code for you. It will be less frustrating, and you'll have working code sooner.
However, if you want to learn code, treat learning a computer language like learning a human language.
- learn the grammar of your language
- learn the vocabulary of your language and of any libraries you want to use
- practice common structures until they are second nature
- read things written in your target language