I think the bit you are missing is the Arduino UNO sketch that accepts the Gcodes, parses them and drives the stepper.
Warning none of the links below parse Gcode
but should give you some ideas
Multi-tasking in Arduino has a complete stepper example
driven by user (serial) input and a sensor.
Arduino Serial – Reading/Parsing covers the basic of reading from Serial (using Arduino Strings or my SafeString library)
The Serial Basics - Updated covers somewhat similar ground but using low level char[ ]'s directly and string (lower case s) functions.
Of course I use my SafeString library ![]()
Arduino Serial I/O for the Real World covers in detail handling large inputs.