The phrases do not mean the same thing, and while they may often be used interchangeably, this is not always the case.
You must not put your fingers in the spinning gears!
For adults, this is an admonition based on objective reality. It really means
You must not put your fingers in the spinning gears [or you will get injured]!
But in many situations, there is no authority that controls this activity. If we are talking about your machine in your home, it really doesn't make sense to say
You are not allowed to put your fingers in the spinning gears!
Not allowed by whom?
For children, we often impose an authoritarian limitation because they don't yet understand the practical limitation, and so the terms are often substituted. Also, for adults, practical and authority restrictions often coincide.
You must not run a red light.
You are not allowed to run a red light.
Sometimes must not is used to indicate lack of permission by an authority, even where there is no real practical risk
You must not fail to salute passing flag.
In short, for the vast majority of circumstance where not allowed to works, must not will also work. For some circumstances where must not works (where there is no rule, but real practical downsides), not allowed to does not.