Both 'had better' and 'have to' are used for strong advice. However, 'had better' can only be used in the situation where there is a threat (and 'have to' can ... - https://www.englishcurrent.com/grammar/had-better-must-should-difference/