How to add external GPIO interrupts on STM32?
Click on the pin you want to configure, then select GPIO_EXT# in the dropdown menu, that should enable the EXTI line in the NVIC menu. 

On the other Hand, CubeMX isnt perfect and it might not have the interrupt on the pins you want well implemented