deber vs tener que
Both mean 'must' or 'have to' — deber is moral obligation, tener que is practical necessity.
deber
Moral duty, obligation you owe — what you should do as a matter of principle.
Debes ser honesto.
You must be honest.
Moral imperative. Tener que ser honesto would sound more like a practical requirement.
Debería llamarla.
I should call her.
Conditional of deber = should. The most natural way to express mild obligation in Spanish.
Debo de tener razón.
I must be right. / I'm probably right.
'Deber de' (with de) = probability, not obligation. 'Debo tener razón' = I have a duty to be right. Huge difference.
tener que
Practical necessity — you have to do it because of circumstances.
Tengo que irme, el tren sale en diez minutos.
I have to go, the train leaves in ten minutes.
External circumstance forcing the action. No moral dimension — just logistics.
Tienes que probar este vino.
You have to try this wine.
Strong recommendation. Tener que is common for this in everyday speech.
Tuve que mentir.
I had to lie.
Circumstances left no choice. Debí mentir would sound like you had a duty to lie — odd.
Tricky bit
'Deber de + infinitive' (deduction: 'must be') vs 'deber + infinitive' (obligation: 'must do'). The tiny 'de' changes everything. 'Debe de estar cansado' = he must be tired. 'Debe estar aquí' = he's supposed to be here.