What's the exact meaning of "You should have passed the exam."? [duplicate]

Solution 1:

Modal verbs are tricky because the same modal can have different interpretations. Without context, we cannot be certain which situation is being expressed. For example,

You could have passed the exam

a. (Sympathetic) The candidate had the ability and capability to pass the exam but he/she didn't.
b. (Disapproving) The candidate didn't pass because he/she didn't study hard enough.
c. (Objective) The candidate had the opportunity to pass the exam, but failed. We do not know why. d. (Suggestion) The candidate never sat the exam but if they had, they might have passed.

Likewise for should

You should have passed the exam.

a. (Surprised) The exam was relatively easy for anyone to pass, but the candidate failed.
b. (Obligation) The candidate had to pass, but he/she didn't.
c. (Disapproving) Although the exam was within the candidate's ability, he/she failed.
d. (Deduction/incredulity) Despite all expectations, and the candidate's preparation, he/she failed the exam

Only greater context will tell the listener which of the scenarios listed above is meant.

Solution 2:

"How to correctly use should in many contexts like this?"

Using it correctly would involve the other person understanding how you meant it, yes?

This seems to be a question about body language, tone of voice and context. English words have many possible uses, so it's the way, time and place that they are used that define their meaning.