Wiring a Potentiometer for a positive voltage
The neutral name of this 3-terminal variable resistor maybe should be something like "variable resistor with three terminals". Depending on how you wire it (which terminals you use), there are two basic configurations:

Variable resistor (rheostat). This is your connection. You use two terminals - one of the end and the middle (slider). In this case the resistance changes and you can adjust the current (through something like a motor).

Potentiometer. In this configuration, you have to apply the input voltage across the whole resistor (i.e., between the end terminals) and to take the output voltage between the middle terminal (slider) and one of the end terminals.