Helpful if you don't have potentiometer.
If you want fixed voltage for a particular circuit you can use two resistors to divide the voltage.(If your supply is 5v and you want supply of 3v or any value for another circuit from the same 5v you can use voltage divider)
Vo=R2/R1+R2Ă—Vin
You know the value of Vin and Vo i.e, input and output voltage.
Assume R2 and you will get the value of R1.
In this simulation R2=330.