Energy in the universe was present originally before other things - in the form of potential energy.
Energy in the form of energy associated with matter E = m c²
There was gravitational potential energy associated with masses. There was thermal energy due to heat and temperature. There was magnetic potential energy due to magnetic properties. There was electrical energy due to electrical charges.
These potential energies get converted into kinetic energies, light, sound, radiation or other forms of energy, due to physical or chemical processes constantly taking place in the universe.