Spain does not produce any oil or natural gas. They buy their oil and natural gas from places like Mexico, Iraq, Russia and Nigeria (all of whom treat their citizens and the environment with the utmost respect), so Spain should be left out of the conversation as they export the pollution to countries with loose regulations and horrible human rights records when they buy their fossil fuels. When oil prices are high, it increases the reliance on lower yield reserves (so the Catalonian Soup man rejoicing in high oil prices that actually encourage extraction of reserves with a greater carbon footprint is ironic). Not to mention that public transport makes far more sense when you are a densely packed population than it does when you are spread out and have a productive economy. The Spanish economy is a mess with 15% unemployment and 37% of those between the ages of 15-24 out of work). Many Spanish youths look for employment abroad. Their green economy hasn't done much to produce jobs.
As Precious Roy observed, prices are rising because US production dropped early in Coronavirus and has been slow in boosting production. A big reason for this is Biden and the left have made it more difficult to produce oil domestically (federal leasing moratorium, enacting anti-fracking legislation on the state level that increase the distance new drilling sites have to be from residences, etc.). Combined with the cancellation of Keystone XL due to their opposition to tar sand oil, it is a perfectly orchestrated plan to increase gas prices and artificially create inflation on everything from gas to food to clothing.