Need to query RYLR998 LoRa device for its UID in my Arduino code

The variable would be a character array. A good place to start is the Serial Input Basics tutorial.

You will also find the RYLR998 AT Command Guide handy.