Is it ok to create two loops.
You can have as many for loops as you want. You can only have one loop function, that is a function called "loop".
If i place your code at the below " void loop() " then it also work fine.
Which is what I intended. You had the changing of the LEDs and the shifting out to the shift register mixed up together. While this will work fine in this simple case, ultimately it is not what you want to do, because you want to separate functionality so that eventually you can reuse these lines of code by encapsulating them in a function.
Then you only need to call that function every time you want an output and not have to repeat code with a new LED manipulation all mixed in with it.