In WSL2/Linux, here's how I would find a string of text in a file, and then open the file to look for the string.
The "-n" flag shows me the line number.
The nano flag "-c" is to show line numbers, and the "-ET4" part is to make pressing the tab button into 4 white spaces.