Measuring speed of a motorbike wheel

If a input pin has a pull-up resistor enabled the voltage at that pin sits around 5V or HIGH unless and until it is pulled LOW by whatever is attached to the pin. You have your ISR set to detect a rising edge, i.e. when the pin goes from LOW to HIGH. Theoretically, this should only mean a delay as the input pin goes from HIGH to LOW then back to HIGH, but only if the sensor attached to the pin is reliably pulling that pin LOW each revolution of the wheel.

Depending on how what's attached to pin 18 behaves, you may want to try changing the ISR to be falling or disable the pull-up resistor.