If your router has new firmware version (RUT5xx_NW_00.02.xx), you can find out its serial number by simply connecting to its WebUI and navigating to "Status -> System Information" menu:
However, if your router has quite old firmware version (RUT5xx_R_01.00.xx), you would not be able to find out its serial from device's WebUI or SSH.
In such case you would need to upgrade your device's firmware to the latest one and check device's serial number. Additionally, since older hardware RUT500 models does not support latest firmware (firmware can be uploaded, but mobile connectivity will not work), check device's mobile connectivity. If it will not be working, after checking device's serial number, downgrade the firmware back to (RUT5xx_R_01.00.xx).
RUT500 firmware versions can be downloaded from here: https://wiki.teltonika.lt/view/Where_can_I_find_firmwares_for_old_devices%3F