The UK's CfDs (Contracts for Difference) pay schemes like wind farms a fixed price for their output, allowing projects to go out to market saying look based on our plans we're going to make so-and-so-many MWh of electricity, the UK promises to pay so-and-so-much £££ for that electricity, therefore lend us (much less) £££ to build it and we'll pay you a nice return. This means investors only need to care about whether your wind farm proposal actually makes electricity, not guess what the price of that electricity will be when it's sold.
Normally these schemes cost the government money. Say electricity is selling for £50 per MWh, and your wind farm's CfD specifies £80 per MWh, the government hands over £30 per MWh extra to make up the difference.
But, when prices sky rocket the government actually gets paid the difference. When electricity sells for £200 per MWh and your wind farm's CfD said £80 per MWh, you only get £80 per MWh as promised, the other £120 per MWh goes into the general fund to buy missiles or feed orphans or whatever.