'Shall' is sometimes used to show that something is sure to happen or unavoidable. This use is formal and can be poetic.
Darkness shall fall as night comes.
All men shall face death one day.
'Shall' is used in questions when offering to do something or asking what someone wants to do. It is polite and formal.
Shall I open the window?
Shall we dance together?
'Shall' is used to give a strong command or warning. It sounds serious and formal, often in old-fashioned or dramatic speech.
You shall not pass this line!
He shall be punished for this crime.
'Shall' is used in questions to ask for advice or to check what to do next. It is polite and often formal.
What shall we do now?
Where shall I put this bag?