Marlin is CNC control firmware for, usually, 3D printers. It receives G code to control stepper motors, servo motors, heaters and fans.
If you only want to move the x and y axes, only send G code to control those axes.
Then you need to send Marlin the right Gcode to do what you want. I am not familiar with any software to send Gcode to Marlin except the slicer for my 3D printer. You can send individual commands from a serial port, but a protocol must be followed to stream Gcode commands from the serial port.
If you are using only 2 steppers, the CNC shield V3 (Uno) or CNC shield V4 (Nano) running Grbl may be a better fit. Still uses G code but simpler to setup and use. Plus there are free G code senders that you can use to control the setup. Universal Gcode sender is one and my favorite is bCNC.
You do not have to use the CNC shield to run Grbl. I like them because they make it convenient.
If you use Grbl without the CNC shield, Grbl expects the use of certain pins for functions. For example X axis step pin is pin 2, dir pin is pin 5. Below shows the Grbl pin mapping.