If you are using a typical cheap 'LM2596' module, the potentiometer for output voltage is part of a potential divider that sets the 'target' output voltage in the range 3V to 40V. However its only a buck converter not a buck-boost so if you set a voltage greater than the input, it cant actually provide it so with only 9V in, more than 3/4 of the potentiometer range will have no effect on the output voltage, which will be stuck at the input voltage. Its also likely to be a multi-turn preset, so there's lots of turns with no effect. Keep turning it one way till either the voltage drops or it starts clicking gently as you turn it. If it starts clicking, you've reached one end so reverse the direction and keep turning. It should start controlling the voltage *before* it reaches the other end and starts clicking again. If it doesn't either you are turning the wrong preset or the module is faulty.
N.B. I wouldn't trust a cheap adjustable 'LM2596' module to power a Pi in a robot. It only needs enough of an impact or vibration for the potentiometer wiper to loose contact with the track and the output voltage will shoot up, destroying the Pi. A crowbar circuit set to 5.6V to protect it would be advisable if you are using anything more expensive than a Pi Zero. Also, although a genuine LM2596, properly heatsinked, with the right caps and an inductor with a high enough saturation current (>6A) can actually deliver 3A. the current ratings of 'chinesium' LM2596 modules are purely imaginary. A 3A module is unlikely to be good for more than 1.5A and for long term use, is unlikely to be reliable over 1A, so don't try to power any model of PI B with a full compliment of USB peripherals from one! I've put quotes round the LM2596 above because the cheap modules out of china often have fake chips. One easy way to tell, is to check its operating frequency. If its significantly lower than the 150KHz specified in the LM2596 datasheet, you've definitely got a fake. Unfortunately if it is 150KHz, that doesn't guarantee its genuine, as it may be a better grade of fake.