Best to refer to the manual of your exact model, but in general the manual usually says something along the lines of "R S T for 3 phase input - for single phase input choose two wilfully", which I choose to read as use any pin of R,S, or T for live or neutral. I plan to use R live and S neutral, but I haven't turned mine on yet, so don't trust me.

My earth is after the UVW pins, so just check where yours is and that its connected. What ever you do, before switching on, you must check for continuity between U V W and earth. There should be an open circuit - otherwise bad things will happen. I also don't plan on switching the VFD on until its wired up to my spindle - I have a vague memory of that also being a bad idea.

As for UVW and which pin is which, I don't think there is a way of knowing - wire it up, and if it spins the right way you're golden, but if it spins in reverse swap two phases. I plan to use pin 1 on the spindle to U, pin 2 to V, and pin 3 to W as a starting point.