That said, I would suggest to learn coding by building something that you actually want to build. Maybe you have an idea for a project that could make money somehow? Then learn the bare minimum you need to learn in order to build that project.
If you just sit there thinking "I am going to learn how to code" then you will likely dick around learning little bits here and there with no real aim. Coding is a means to an end, not a means in itself.
Here is another idea: take a look at the projects on freelancing sites like Upwork. Try coding some of them yourself. You could make yourself a goal to complete a paid project on Upwork within one years time. Pick a language/platform, find projects in that area on upwork, do them yourself as practice runs, learn the bare minimum you need to complete each practice project. As you do more and more you will learn new things each time and eventually you will be confident enough to do a paid project (though you will likely have to bid a pretty low price to get the job!). But you will have the satisfaction of having earned hard money for your efforts, even if its not much!