How do I convert 0-5v PWM to a 0-12v PWM
I advice you to learn about basics of how to connect external components to MCU.
Anwser to your question is simple transistor amplifier... So you can use bipolar transistor (NPN/PNP) or MOSFET... MOSFETs is better for switching like your case, switching via PWM.
If you switching inductive load with MOSFET like motors or coils, don't forget add antiparallel flyback diode. Otherwise your MOSFET will burn out.

If you need switching with higher frequency or load with more voltage or power I advice to use push-pull logic to drive mosfet gate.
Something like this: