Modals to express obligation: SHOULD, OUGHT TO
Present and future
Should and ought to + infinitive express obligation and duty. Should is used when we offer a subjective opinion, while ought to has a more general and more objective meaning:
I think you should leave.
We ought to protect the environment.
Past
Should and ought to + perfect infinitive express that an action which was desirable was not performed:
You should have consulted a doctor.
You ought to have told me earlier. Why didn't you tell me?