Usually "each" is used to refer to every member in the group, so it is followed by a singular verb like:
Each student and teacher knows that exams are.....
Each of the buildings is surrounded by high metal fencing.
Now I am not sure how the first sentence in the following examples is wrong.
Wrong: They understand the personality of each of their children
Correct: They understand the personalities of each of their children
Wrong: There were four rooms, each with a wonderful view of the garden
Correct: There were four rooms, each with wonderful views of the garden. This example was copied from Cambridge dictionary
Would you please explain it to me?