How can I convert analog voltage to PWM converter just by changing the input voltage
Look at the LTC6992, it converts voltage to PWM.


Source: https://www.analog.com/en/products/ltc6992-1.html#product-evaluationkit