5V interface

The output of the 5 V interface is an irregular positive and negative pulse (when my code is uploaded)
I did not enter a value in the serial monitor…
What is the cause?

My code is:

const int motorPin = 3;

void setup()
{
pinMode(motorPin, OUTPUT);
Serial.begin(9600);
while (! Serial);
Serial.println(“Speed 0 to 255”);
}

void loop()
{
if (Serial.available())
{
int speed = Serial.parseInt();
if (speed >= 0 && speed <= 255)
{
analogWrite(motorPin, speed);
}
}
}

Motor overloading Arduino.