What is the code supposed to do?
Call randomseed only once but call random every time you want a new number... here it seems you generate only one random number - but unsure as your code is a snippet that won’t compile
Go read the documentation and see the example
long randNumber;
void setup(){
Serial.begin(115200);
randomSeed(analogRead(0));
}
void loop() {
randNumber = random(50,300); // generate a random number between 50 and 299
Serial.println(randNumber);
delay(1000);
}