Please help a beginner here. expected constructor...

You need to move the closing } of setup() below those other lines like this:

int Relay = 2;
int stateRelay = LOW;
long time = 0;
int stayON = 1200000; //stay on for 5000 ms

void setup() {
  pinMode(Relay, OUTPUT);
}  //<<<<<<<<<<<<<<<  move this
  
 digitalWrite(Relay, HIGH);
 delay(stayON);
 digitalWrite(Relay, LOW);

}  //<<<<<<<<<<<<<<< to here

And you need a loop() {}.