Potentiometres don't display proper values in the serial monitor

It's an age old issue that most beginners (including myself) have faced, usually it's a cause of bad wiring/soldering, interference, etc etc. I haven't faced this issue for a while until now and I'm kind of stumped, I've tried different potentiometres and different boards and yet the value jumps to either 693, 1023 or 0 depending on the configuration of the GND and VCC wires. I've double checked the soldering to make sure nothing was shorting, and as I said used different pots in case the one I was using was faulty, including one out of an old stereo which I know for sure worked, and yet I can't seem to display any proper values. I know there's little outside interference because the values stay consistent with little to no noise, and even if there were any interference, the value would have at least reacted somewhat to me moving the potentiometre. I haven't encountered an issue like this in years so hopefully I can get some help.

Edit: Apologies, forgot to mention the code I used is the one included in the base sketch examples (in 01.Basics > AnalogReadSerial), though I have also tried typing my own sketch too to be safe, though no luck there either.

There is only one correct configuration.

Source: https://mungfali.com/explore.php?q=Potentiometer%20Circuit%20Symbol

In in top row, bottom pin to GND, top pin to Vcc and runner (middle pin) to Arduino analogue input.

Please note that you need a common ground between the areduino en the potentiometer.

That is probably a good thing as the slider is shorted to one end terminal or the other at full rotation of the pot. Tell us what your Ohmmeter shows when it is used instead of the Arduino circuit.

I meant configuration as in whether I had the left of the three connections of the potentiometre going to GND or VCC, and vice versa for the right connection. The middle connection is hooked up to the analogue pins, in my case A0 (though I've tried others).

Do you have a multimeter? You can use it to check the pot to make sure you're wiring it correctly (that it physically is wired like the schematic) and you can check the voltage at the Arduino's analog input. Every electronic hobbyist should have one and it doesn't have to be an expensive one.

Or if you have 2 equal-value resistors you can make a voltage divider and you should read about 512 (half of the range). Resistors between about 1K and 10K are best so you don't get excess current or pick-up too much noise.

including one out of an old stereo which I know for sure worked

Note that volume control pots are not linear. (But they won't "jump" to a fixed reading like 693.)

Sometimes the "middle" connection isn't the slider.

Through testing the pot with my multi-metre it does show the middle pin as the slider and does react to moving the knob. It's a 50k pot, maybe a little too much? Though it should work fine in the lower range with the arduino.

Just figured it out, actually. Changing out the ground wire seemed to fix the issue, supposedly there could've been a break somewhere inside it? Thank you all for taking the time to stop by and help though, I appreciate it^^