Delay commands In separate loops

delay() cannot be prematurely terminated.

Instead, learn how to use millis() to time events (as many events as you like). One place to start with this tutorial: https://www.baldengineer.com/blink-without-delay-explained.html

More advanced demo: