How to set up a PM2.5 sensor connected via usb cable?

If it connects via USB, it may present the data over a virtual serial (UART) interface. If the device you have supports Linux, maybe try connecting it to a Raspberry Pi running Raspbian first, to confirm that it’s working and you can figure out how to use the provided software, etc. Then, you can try the same with Nerves and see where you get stuck.