Nonequilibrium dynamics of spontaneous symmetry breaking into a hidden state of charge-density wave