I need to see the difference between a tin can and aluminum can using an inductive proximity sensor through the frequency they produce when an inductive proximity sensor detects their presence.
You should connect your sensor to a digital input. but you need to measure the frequency. this is done using the pulse in function as it is here https://www.instructables.com/Arduino-Frequency-Counter/
Or another approach is to use the port manipulation read to poll the digital input as in the code below.
also below, for frequencies lower than 20Hz the millis() function is used, and for frequencies higher than 20Hz the micros() function is used. The input pin is digital pin 9 or PB1, hence PINB&2