My game freezes

I made a game consisting of 2 levels, when i click play the game runs well, till the player wins. If i press back to go to main menu, and try to open any level again i find it freezing, and don’t respond only if i clicked on restart. Any help!

a while statement?

Please post your code what are you doing when player wins. Without checking your code no one could properly tells what and were you are wrong.
One things is are you changing Time.timeScale value to 0?
Sometimes on win condition we normally change time scale to 0 top stop the game. But don’t reset to one.
Its my blind guess.