MUST and HAVE TO both express necessity. In everyday statements of necessity, have to is used more commonly than must. Must is usually stronger than have to and can indicate urgency.
When used in the negative ‘must‘ and ‘have to‘ have different meanings.
MUST NOT = prohibition (do not do this!)
• You must not tell anyone my secret. Promise?
[Do not tell anyone my secret. I forbid it. Telling anyone my secret is prohibited.]
DO NOT HAVE TO = lack of necessity
• I can hear you clearly. You don’t have to shout.
[It is not necessary for you to shout because I can hear you clearly.]
Lack of necessity may also be expressed by NEED NOT + verb1.
• You need not shout at me.
• You needn’t worry.