Learn the basic syntax.
Find a template and figure out the code structure.
Use it for several documents (and learn the general document structures).
Write a simple template from scratch.
The rest is just a matter of practice.
This also works for other markup languages.
Overleaf: Online tutorial.