What's the difference between should, ought to and had better?

Do you know the difference between these three modal verbs?
We use all these to give advice to someone; however there is a slight difference with had better and that is.

Had better is used when there are consequences if someone being advised doesn’t take the advice.
For example,

  • You had better wear your mask or else you will be fined.(warning)
  • You should wear your mask. (advice)