It helps to keep your code so simple and peppered with comments than even an idiot (you) can understand it.
You don't learn to code by reading code, much like you don't learn to do math by reading equations, or carpentry by looking at houses. You have to get your hands dirty. Start with something "Hello World" level simple and add more bits as you go along. That's what we all do, really. The end result of such an iterative process will look inscrutable to others, but make perfect sense for you, because you made it.
Big dirty public secret: One guy's code being inscrutable to the next guy is why the next guy always argues for getting rid of the system that the previous guy developed. It's usually not because it's a bad system (your new system eventually becomes the next guy's "bad old" system, after all), but because no programmer thinks the same way.
Programming is very much a reflection of how a person thinks, of a mental model, and mental models are extremely individual things. Reading someone else's code is an exercise in empathy, and empathy isn't something programmers are known for. Programmers love to exist on their own little islands where everything works according to their internal logic. Teamwork means compromises. I once had to quit a job because I couldn't understand the internal logic of the team I had been hired to work with, as reflected in their codebase.
The main trait needed in a programmer is the ability to endure mind-bending levels of frustration. You have to keep hammering that nail until the problem is solved.