What is even better is when countries help each other and build a good friendship.
The 'when' is clearly used not to mean 'the time'. What does it actually mean and can it be replaced by 'that'?
Thank you in advance.
It means 'times when'. If we use 'that', the sentence has a different meaning; it is saying that countries do help each other, and that fact is even better than one previously mentioned,