Simple way of measuring RPM of motor by How to make Frequency/Pulse counting circuit
It seems like you want a tachometer.

here's one for $5:

https://www.aliexpress.com/item/tachomete/32341476440.html

seeing as you only want to go to 500RPM, To get more precision you can use a wheel with 10 slots (or 10 pulses per revolution) and divide the reading by 10.

It comes with an optical sensor, but that seems to be optional.