ESP8266 and over serial turn on relay on Arduino nano, how?

I have connected wemos D1 for mini with Arduino NANO using RX / TX. I have a website on wemos through which I want to control several relays connected to the Arduino NANO. What will the code for RX / TX cuminization look like?
Thank you very much for your help, I can't do it at all.

If you don't need too many IO-Pins you could write the whole code on the ESP8266 whcih would make things a bit easier.
Though the ESP8266 has only 3.3V on his IO-Pins. Here it depends on how you connected your relais.

As you haven't posted or attached your code it is hard to say how your code should look like.

If you want to keep the combination of Arduino and Wemos.

Inside the Wemos-Code somewehre you have a part that reacts on requests.
Inside this part of the code you send some characters over the serial connection

Serial.print("ON");

Serial.print("OFF");

On the Arduino-side you wait for the receiving of this serial message and read it.
Then you react on it.

How this code has to look like highly depends on the rest of your code.
So from my rather unprecise answer you can experience how other users don't know what to answer in detaill

It is always a good idea to describe your whole project. If you describe your whole project much better suiting answers can be given.

best regards Stefan