The energy then  might have transformed into mass, as particles could be created out  of energy.During big bang,universe was infinitely hot.As the  universe expanded, its temperature would have decreased to few  million centigrades.At this temperature, the molecules lost their  capability to overcome nuclear force,and would have started to form  atoms and molecules.This process finally gave birth to several  trillion molecules,which have been transferred evenly throughout  the space available. By this process,the universe is thought to be  originated. S Ayush