So the first thing you can do to start learning to code hacks is.
1. Pick a language to code in. It doesn't really matter. Obviously lots of people use c++ and swear by it. I personally hate c++ so I don't use it. If you are coding externals I have found it pretty simple.
2. GOOGLE IS YOUR FRIEND. You are very unlikely to be the first person to ask your question about the subject. Only ask after you have looked for several hours after many many different search terms. Even then you still may not get your answer and you may need to find out how to do it your self.
3. I started by basically copying github releases and from there i understood what exactly was happening and know what most stuff does.
4. Learn how to use cheat engine to get the offset values (this will literally give you the majority of your answer. This tends to be a bit daunting to start but im sure is simple once you understand it.)(side note i haven't done this yet and is my next plan)
5. Start coding your hack.
This is a very simplistic way to look at it but it works
I learned coding a esp and trigger bot are very basic and easy to do. You can also do radar hacks pretty quickly as well. That is the best place to start.