If you press the key and see no highlights, run through these checks in order.
Check the basics
1. Is a sample loaded? The scanner only finds the ore whose block you placed in its menu. Open the menu and confirm exactly one sample is inside.
2. Is it switched on? K toggles the scanner. If you pressed it twice, it is off again. Press it once more.
3. Is the key still K? The activation key is assignable. If K does nothing, open Options > Controls and look for the scanner's entry. Another mod's keybind may be conflicting with it.
4. Are you in range? The scanner covers a cube 41 blocks across centered on you. If the ore is farther away than that, nothing will show. Move to a new area and try again.
5. Does the ore exist here? Diamonds and ancient debris sit at specific depths in specific dimensions. Make sure you are in the right place to find your target.
Multiplayer
The scanner's tracking runs on the server, not on your own game. On a multiplayer world, the mod has to be working on the server for the scanner to give results. If it behaves correctly in single-player but not on a server, ask the server admin whether the mod is set up there.