 miners are looking for the Nonce to create an SHA256 code that starts with the required number of zeros that the difficulty adjustment demands at the point of mining. That search for the nonce,is mining,mining costs energy. The reward is new issued Bitcoin, which are energy.