We often use
must for more personal opinions about what it is necessary to do, and
have to for what somebody in authority has said it is necessary to do.
Have to shows us that the obligation comes from somebody else. It’s a law or a rule and the speaker can’t change it.
Do you have to wear a uniform at your school?
John can’t come because he has to work tomorrow.
In Britain you have to buy a TV licence every year.