Some US universities ban first-year graduate students from working outside TA/RA.
How can US universities check whether graduate students work outside TA/RA?
Academia Stack Exchange is a question and answer site for academics and those enrolled in higher education. It only takes a minute to sign up.Sign up to join this community
How can they or how do they?
The chances are pretty slim that a university is able to follow-up on graduate students extracurricular lives. Perhaps it happens if someone gives them reasons to but it is still very unlikely. The exception to this is within the university system -- I would expect that to be easier for them to do (as pointed out by Jon Custer in the comments).
How can they? Well, anything is possible. Someone could make this their investigative mission. They could hire someone like a private investigator. They could play secret agent themselves and follow you. These all are possible but unlikely.