It is called mudita
by Friends of Godwin
Another beautiful thing is rejoicing in the happiness of others. When you see other people happy that makes you yourself very happy. When you are happy, you are happy about that, and when you see others happy, you are happy about the happiness of others. It is called mudita, sympathetic joy.