Let’s focus on ...past modals.
That can’t have happened.
That needn’t have happened.
That must have happened.
We use can’t have + past participle when we are sure that something did not happen.
We use needn’t have + past participle when something was done but it was unnecessary.
We use must have + past participle when we are sure that something happened.