Yea, check the obvious things. I know they may seem like “Duh,” but walking through the basics sometimes unravels the answer. Does the guitar make sound on an amp. Is the output on the Guitar loose. Does the exact same cable work on an amp (rule out the possibility of a bad cable). Are you turning the volume up on the guitar when you plug it into the UR22, Is the correct UR22 input dial simultaneously turned up. Are you using the right input channel on the track (Test this with your drums, don’t make a separate track for the drums, use the same track header). Sometimes you need to turn an interface up really loud to hear a line guitar because it’s not amped, so don’t be afraid to max the volume on the Guitar, and start with the UR22 at straight up (I suggest a strong signal anyways).
If you’re getting sound when plugging in, chances are your guitar pickups might have an issue. Big tip: Try changing the pickup switch, (five/ish way lever) chances are not all pickups are bad. Any local shops near you? If you can’t get a sound out of an amp, head to a store, and see what they say. They won’t charge you to look it at, and they’ll shoot you an estimate.