Glad it is working.

PORTB has an interrupt on change. When the state of PORTB.0 changes an interrupt can be triggered.

An example would be counting parts on a conveyor. The MCU can be off doing something else like sending data to a display while a sensor/switch is activated as a part passes by. Then when the MCU is finished with the display the part count can be increases.
That is using PBP interrupts. If you go with ASM or Darrel Taylor's instant interrupts then the trigger is instantly. But you still need a certain amount of time for everything to happen.

Either way, you do not need to loop back and check the state of the pin, it happens for you in the background.