How to use 5v relay module for underground cable fault detection project

Sorry, i can’t see your code here on my tablet.
Please post inline with </> code tags.

More importantly, it seems some fundamentals are missing.
Posting a schematic would help, but I suspect you’re looking for TDR (time domain reflectometry) which will need a lot more than a relay.