Controlling the digital input of a frequency inverter with an Arduino
Probably you would want to use the VFD's MODBUS interface.
For an electrical connection you would need an RS-485 driver, preferably a galvanically isolated one since VFDs are notoriously electrically noisy.
For the software, you would need a MODBUS library, which is easy to find online.
Then you would need to study the VFD manual to determine what instructions to send to the VFD to make it do what you want.