Edit the pwm_hz to the maximum operating frequency of your diode laser and make sure to set the speed map to the same range as the speed map (S) in your control software like lightburn for example. So when the speed map in your config is 0-1000 it should also be 0-1000 in your laser software and not 0-255.
Edit the tool number if you are using multiple tools like a laser and a spindle.
But if you’re using a spindle with PWM control you cannot connect both at the same time, that is only possible when you use a rs485/VFD controlled spindle.
Hope this helps! There’s a bunch of information on the Root cnc Wiki and examples of config files on the Github page. Also make sure to check out the fluidnc wiki if you wanna dive a bit deeper.