unstable analogRead()

Hello evryone, I have a problem in my mega card where the values on output from the ADC are not stable, there are two solutions offered on google.

1/ the first to add an external 0v..5v reference in AREF, and I got the result in the first picture:

int a=0;
void setup()
{
Serial.begin(115200);
analogReference(EXTERNAL);
pinMode(A0,INPUT);
analogRead(A0);
}

void loop()
{
a=analogRead(A0);
delayMicroseconds(210);
Serial.println(a);
Serial.print(" ");
}

2/the second solution and add a short delay after the Read function, although this function includes a sufficient delay to convert the analog signal,and I got the result in the second picture:

int a=0;
void setup()
{
Serial.begin(115200);
pinMode(A0,INPUT);
analogRead(A0);
}

void loop()
{
a=analogRead(A0);
delayMicroseconds(210);
Serial.println(a);
Serial.print(" ");
}

so is there any other proposal or is there a possibility that the ADC circuit in the controller is damaged?

What is connected to A0?

//Edit
Connect A0 to ground; what does it read?
Connect A0 to 5V; what does it read?
Connect A0 to 3.3V; what does it read?

in the first case an output of a water level detector with the presence of water, in the second nothing

What is " a water level detector" ?

in a small basin where there is a humidifier a 5v cable at the base, another cable put in a level of the basin linked to the GND with a 10K resistor and before this resistor a bypass to the analog input.

If you connect nothing to an input, it's called a floating input which can read anything from 0 to 1023 (analogue input) as it picks up noise from the environment.

As indicated, test with 0, 3.3V and 5V to determine if it's your Mega. Short wires, not 10 meters or so.