1- That depends on what do you mean by is not working: on transmit? on receive? interrupt is not working?? etc ... You should at least connect another node on the CAN bus to let the frames you send to be acknowledged by this node. You need also to ensure you have the same baudrate and all your hardware is OK including the CAN transceivers.
2- You are using HSI for the can communication which is not recommended for CAN communication. You need to use an external accurate clock such as a crystal or crystal oscillator.
Otherwise I don’t see an issue in your code except the HSI source. While this call is not necessary in the interrupt callback: