You are using for-loops with delay() both are blocking.
This means the for-loop must run completely through before other code can be executed.
You have to replace the for-loops by that natural loop that is always there:
void loop() itself.
The basic principle how you do this is explained here
If you are a beginner you will still have questions how to write this for your code.
Make a first attempt and in case it does not yet work ask again by always posting your complete sketch.
best regards Stefan