Relay : green led and red led

I fully understand the problem.
You don’t need to find examples, just read the documentation for BLYNK_CONNECTED()

Alternatively, you could read this:

and read the “Synchronising the output state with the app at startup” section, but it’s just a more wordy version of what is in the official documentation:

https://docs.blynk.cc/#blynk-firmware-blynktimer-blynk_connected

Pete.