I learned by reviewing other great macros. I think if you understand the class and how GSE works then you can start experimenting. There are a lot of factors.
For DH I have used Vengeful Hermits macro. Vengeful Hermit Updated 12/29/22
I am still working to better understand the current DH rotation and play style. Once you have a good grasp then you can use logs in M+ and Raid to understand your macro usage and adjust based on that. I also like using details and the details plugin that shows your actions/spell casts so you can see what is getting activated in the macro cycle.
I do have an IT background so scripting and macros are something I am familiar with.
All that to say is you just have to jump in and start doing. You can look at a lot of good macros from a lot of classes/specs to see how different authors write/sequence and structure them to learn. If I do posted a DH macro I will cross link it here.
Happy Gaming