Trying to do a circuit to variate voltage from GND to VCC using MOSFET and transistor
You are basically trying to build a linear regulator. Your circuit has a poor voltage control because the control sensitivity is strictly determined by turning-on point of the bipolar transistor. Once the supply voltage is high enough to turn Q2 on (Max ~ 1.2V), current will start to flow through it and the gate of the MOSFET U3 will be pulled low, thus shutting the MOSFET down.
There are already many cheap off-the-shelf Linear Regulators you can use, however, if you really want to build one from scratch and with discrete components, you could use a circuit similar to the following:

Source: Link to Circuit
Essentially you would connect a pot in series with R3 (in order to keep a minimum resistance) and regulate the feedback through it.
The way the circuit works is as follows. At startup the MOSFET is connected in a diode configuration and its gate-source voltage is higher than its gate threshold voltage, thus it is on. As the output voltage increases, so does the feedback voltage formed by R2 and R3. Once the Feedback voltage reaches 2.5V, the shunt-regulator TL431 is turned on and begins to sink current through its cathode, therefore pulling down the gate of the MOSFET, which in turn shuts it down. This negative feedback leads to a controlled output voltage given by:
$$V_{out} \approx 2.5V \cdot \frac{R_2 + R_3}{R_3} $$