I have turn on 16 LEDs one by one using two 74HC595 shift register. I have some doubt regarding my code and need some help

Note that then the 74HC595 needs to be in series (daisy chained) , while the OP uses them in parallel (otherwise it would not work)