Here’s for the crayon drawing and a short explanation:
The pinout for 2.4d is discussed here, to locate PWM signal:
Then it all depends on what VFD you have, to setup its parameters.
There’s a thread for Huanyang VFDs configuration here:
That should allow you to turn the spindle on and off, and adjust RPM. It’s not straightforward to control forward/reverse, you would need an additional signal for that.
And then ask additional questions here, many people have done this and will be in a position to help you.