You just have to practice more and more in order to get command
Remember some points while doing nested loops
1 - Make sure you use different variables for controlling the counter of both loops ( if you are working with counter control loops)
2 - Always reset the counter of inner loop before its start in outer loop
3 - Always make sure to use delimiters inside loops and right align the inner loop so that you can understand easily
4 - Do not make such conditions in which both loops can collide