Control voltage to heat resistor using PID
If you want to control a resistive load like a heater in an actual proportional way, you would typical do so with a TRIAC driver.
But while a phase cutting TRIAC &quot;sort of&quot; varies the voltage in the sense that it may prevent the load from ever seeing the peak part of the waveform, in reality what it mostly does is create a form of pulse width modulation, at the AC line frequency rate - you are turning the heater on and off, but at a very rapid rate.
Heaters and whatever they are heating tend to have a substantial thermal time constant.  Which is to say, that they take a while to heat up and cool down.
In practice this means that many heater controllers simply implement on/off control at a time scale humans can actual notice by sound or sometimes sight, if not by effect.
But if you want to tightly control temperature in a small range, then something like a TRIAC could be worthwhile.  Beware that as the TRIAC itself is implicitly mains connected, this is tricky to do right.  If you go down this path in a DIY project, at bare minimum make sure that both your zero cross detection and your TRIAC driver use optoisolators - conventional for the first, probably opto-TRIAC to drive the power TRIAC for the second.
You then have the choice between using a phase-cutting scheme as needed for something with a short time constant like a light or universal motor, or perhaps using a simpler scheme where you either power or do not power the heater for an entire half-period of the AC waveform at a time.  The latter is electrically &quot;cleaner&quot; since you switch only at the zero crossing point when a resistive load is drawing no current.
It's not really clear that this kind of fine scale control and all of its complexity is going to be very useful for your goal, vs getting a quality solid state relay and simply commanding it on or off on the timescale of a moderate fraction of a second.